def main(opts, per_package_main=build_pkg_main): # use PWD in order to work when being invoked in a symlinked location cwd = os.getenv('PWD', os.curdir) opts.directory = os.path.abspath(os.path.join(cwd, opts.directory)) if not os.path.exists(opts.basepath): raise RuntimeError("The specified base path '%s' does not exist" % opts.basepath) opts.build_space = determine_path_argument( cwd, opts.directory, opts.build_space, 'build' if not opts.isolated else 'build_isolated') opts.install_space = determine_path_argument( cwd, opts.directory, opts.install_space, 'install' if not opts.isolated else 'install_isolated') packages = topological_order(opts.basepath) circular_dependencies = [ package_names for path, package_names, _ in packages if path is None ] if circular_dependencies: raise VerbExecutionError('Circular dependency within the following ' 'packages: %s' % circular_dependencies[0]) pkg_names = [p.name for _, p, _ in packages] check_opts(opts, pkg_names) consolidate_package_selection(opts, pkg_names) print_topological_order(opts, pkg_names) if set(pkg_names) <= set(opts.skip_packages): print('All selected packages are being skipped. Nothing to do.', file=sys.stderr) return 0 return iterate_packages(opts, packages, per_package_main)
def main(opts, per_package_main=build_pkg_main): # use PWD in order to work when being invoked in a symlinked location cwd = os.getenv('PWD', os.curdir) opts.directory = os.path.abspath(os.path.join(cwd, opts.directory)) if not os.path.exists(opts.basepath): raise RuntimeError("The specified base path '%s' does not exist" % opts.basepath) opts.build_space = determine_path_argument( cwd, opts.directory, opts.build_space, 'build' if not opts.isolated else 'build_isolated') opts.install_space = determine_path_argument( cwd, opts.directory, opts.install_space, 'install' if not opts.isolated else 'install_isolated') packages = topological_order(opts.basepath) circular_dependencies = [ package_names for path, package_names, _ in packages if path is None ] if circular_dependencies: raise VerbExecutionError('Circular dependency within the following ' 'packages: %s' % circular_dependencies[0]) print_topological_order(opts, packages) iterate_packages(opts, packages, per_package_main)
def main(opts, per_package_main=build_pkg_main): # use PWD in order to work when being invoked in a symlinked location cwd = os.getenv('PWD', os.curdir) opts.directory = os.path.abspath(os.path.join(cwd, opts.directory)) if not os.path.exists(opts.basepath): raise RuntimeError("The specified base path '%s' does not exist" % opts.basepath) opts.build_space = determine_path_argument( cwd, opts.directory, opts.build_space, 'build' if not opts.isolated else 'build_isolated') opts.install_space = determine_path_argument( cwd, opts.directory, opts.install_space, 'install' if not opts.isolated else 'install_isolated') packages = topological_order(opts.basepath) circular_dependencies = [ package_names for path, package_names, _ in packages if path is None] if circular_dependencies: raise VerbExecutionError('Circular dependency within the following ' 'packages: %s' % circular_dependencies[0]) pkg_names = [p.name for _, p, _ in packages] check_opts(opts, pkg_names) consolidate_package_selection(opts, pkg_names) print_topological_order(opts, pkg_names) if set(pkg_names) <= set(opts.skip_packages): print('All selected packages are being skipped. Nothing to do.', file=sys.stderr) return 0 return iterate_packages(opts, packages, per_package_main)
def main(opts, per_package_main=build_pkg_main): # use PWD in order to work when being invoked in a symlinked location cwd = os.getenv('PWD', os.curdir) opts.directory = os.path.abspath(os.path.join(cwd, opts.directory)) if not os.path.exists(opts.basepath): raise RuntimeError("The specified base path '%s' does not exist" % opts.basepath) opts.build_space = determine_path_argument( cwd, opts.directory, opts.build_space, 'build' if not opts.isolated else 'build_isolated') opts.install_space = determine_path_argument( cwd, opts.directory, opts.install_space, 'install' if not opts.isolated else 'install_isolated') packages = topological_order(opts.basepath) circular_dependencies = [ package_names for path, package_names, _ in packages if path is None] if circular_dependencies: raise VerbExecutionError('Circular dependency within the following ' 'packages: %s' % circular_dependencies[0]) print_topological_order(opts, packages) iterate_packages(opts, packages, per_package_main)