def handle_noargs(self, **options): self.logger = logging.getLogger('collectreqs') self.logger.setLevel(logging.INFO) console = logging.StreamHandler() console.setLevel(logging.INFO) console.setFormatter(logging.Formatter('%(message)s')) self.logger.addHandler(console) # HACK: we expect the test cases to spout warnings, don't want the user to see them and get upset if os.environ.has_key('TEST_SUPPRESS_STDERR'): console.setLevel(logging.ERROR) siteDir = commandUtil.getSiteDir() self.logger.debug('siteDir: %s' % siteDir) outName = '%s/build/management/allRequirements.txt' % siteDir subReqFileList = ( glob('%ssubmodules/*/requirements.txt' % siteDir) + glob('%sapps/*/management/requirements.txt' % siteDir) + glob('%smanagement/siteRequirements.txt' % siteDir)) builder = Builder() builder.applyRule(outName, subReqFileList, lambda: self.collect(outName, subReqFileList))
def handle(self, *args, **options): siteDir = commandUtil.getSiteDir() builder = Builder() context = dict(((k, getattr(settings, k)) for k in dir(settings) if not k.startswith("_"))) context.update(dict(USER=os.getenv("USER"))) srcs = glob("%smanagement/preptemplates/*" % siteDir) for src in srcs: dst = "%sbuild/preptemplates/%s" % (siteDir, os.path.basename(src)) builder.applyRule(dst, [src], lambda: fillTemplate(src, dst, context))
def handle_noargs(self, **options): siteDir = commandUtil.getSiteDir() builder = Builder() context = dict(((k, getattr(settings, k)) for k in dir(settings) if not k.startswith('_'))) context.update(dict(USER=os.environ['USER'])) srcs = glob('%smanagement/preptemplates/*' % siteDir) for src in srcs: dst = '%sbuild/preptemplates/%s' % (siteDir, os.path.basename(src)) builder.applyRule(dst, [src], lambda: fillTemplate(src, dst, context))
def handle_noargs(self, **options): self.logger = logging.getLogger('collectreqs') self.logger.setLevel(logging.INFO) console = logging.StreamHandler() console.setLevel(logging.INFO) console.setFormatter(logging.Formatter('%(message)s')) self.logger.addHandler(console) # HACK: we expect the test cases to spout warnings, don't want the user to see them and get upset if os.environ.has_key('TEST_SUPPRESS_STDERR'): console.setLevel(logging.ERROR) siteDir = commandUtil.getSiteDir() self.logger.debug('siteDir: %s' % siteDir) outName = '%s/build/management/allRequirements.txt' % siteDir subReqFileList = (glob('%ssubmodules/*/requirements.txt' % siteDir) + glob('%sapps/*/management/requirements.txt' % siteDir) + glob('%smanagement/siteRequirements.txt' % siteDir)) builder = Builder() builder.applyRule(outName, subReqFileList, lambda: self.collect(outName, subReqFileList))