def genidx_mreposet(self, filter): logsdir = xjoin(self.options.multi_repository_set_path, '_logs') with log.archivedby(logging.getLogger('pypm'), logsdir, 'repository_genidx', level=logging.INFO, formatter=logging.Formatter('%(asctime)s %(message)s')): mreposet = MultiRepositorySet( self.options.multi_repository_set_path, self.options.configfile ) skipped = 0 LOG.info('Generating indices for repositories in: %s', mreposet.path) with textui.longrun(LOG): for repo in mreposet: if filter and not fnmatch(repo.path, '*'+filter+'*'): skipped += 1 continue LOG.info('') LOG.info('-> {0.name:6}{0.pyver:6}{0.osarch:15}'.format(repo)) LOG.info(' %s', repo.path) idx = RepositoryIndex(repo) idx.generate_index() if skipped: LOG.warn('skipped %d repositories', skipped)
def genidx_mreposet(self, filters): logsdir = xjoin(self.options.multi_repository_set_path, '_logs') with log.archivedby( logging.getLogger('pypm'), logsdir, 'repository_genidx', level=logging.INFO, formatter=logging.Formatter('%(asctime)s %(message)s')): mreposet = MultiRepositorySet( self.options.multi_repository_set_path, self.options.configfile) skipped = 0 LOG.info('Generating indices for repositories in: %s', mreposet.path) with textui.longrun(LOG): for repo in mreposet: if filters and not any( [fnmatch(repo.path, '*' + f + '*') for f in filters]): skipped += 1 continue LOG.info('') LOG.info( '-> {0.name:6}{0.pyver:6}{0.osarch:15}'.format(repo)) LOG.info(' %s', repo.path) idx = RepositoryIndex(repo) idx.generate_index() if skipped: LOG.info('ALERT: skipped %d repositories', skipped)
def _do_write_files_list(self, subcmd, opts): """${cmd_name}: Generate .d/files and .d/imports files for all packages ${cmd_usage} ${cmd_option_list} """ with self.bootstrapped(): mreposet = MultiRepositorySet( self.options.multi_repository_set_path, self.options.configfile ) skipped = 0 LOG.info('Generating .d/<files,imports> for repositories in: %s', mreposet.path) with textui.longrun(LOG): for repo in mreposet: if opts.filter and not fnmatch(repo.path, '*'+opts.filter+'*'): skipped += 1 continue LOG.info('') LOG.info('->> {0.name:6}{0.pyver:6}{0.osarch:15}'.format(repo)) LOG.info(' %s', repo.path) from pypm.builder.mason import _extract_files_list for pypm_file in textui.ProgressBar.iterate(repo.find_packages()): if opts.only_new: if all([exists(pypm_file + '.d/imports'), exists(pypm_file + '.d/files')]): continue modules = _extract_files_list(pypm_file) LOG.info('P: %s -> %s', os.path.basename(pypm_file), modules) if skipped: LOG.warn('skipped %d repositories', skipped)
def _do_write_files_list(self, subcmd, opts): """${cmd_name}: Generate .d/files and .d/imports files for all packages ${cmd_usage} ${cmd_option_list} """ with self.bootstrapped(): mreposet = MultiRepositorySet( self.options.multi_repository_set_path, self.options.configfile) skipped = 0 LOG.info('Generating .d/<files,imports> for repositories in: %s', mreposet.path) with textui.longrun(LOG): for repo in mreposet: if opts.filter and not fnmatch(repo.path, '*' + opts.filter + '*'): skipped += 1 continue LOG.info('') LOG.info( '->> {0.name:6}{0.pyver:6}{0.osarch:15}'.format(repo)) LOG.info(' %s', repo.path) from pypm.builder.mason import _extract_files_list for pypm_file in textui.ProgressBar.iterate( repo.find_packages()): if opts.only_new: if all([ P.exists(pypm_file + '.d/imports'), P.exists(pypm_file + '.d/files') ]): continue modules = _extract_files_list(pypm_file) LOG.info('P: %s -> %s', os.path.basename(pypm_file), modules) if skipped: LOG.warn('skipped %d repositories', skipped)