def create_build_process(process_type, working_dir, build_system, package=None, vcs=None, ensure_latest=True, skip_repo_errors=False, ignore_existing_tag=False, verbose=False, quiet=False): """Create a `BuildProcess` instance.""" from rez.plugin_managers import plugin_manager process_types = get_build_process_types() if process_type not in process_types: raise BuildProcessError("Unknown build process: %r" % process_type) cls = plugin_manager.get_plugin_class('build_process', process_type) return cls( working_dir, # ignored (deprecated) build_system, package=package, # ignored (deprecated) vcs=vcs, ensure_latest=ensure_latest, skip_repo_errors=skip_repo_errors, ignore_existing_tag=ignore_existing_tag, verbose=verbose, quiet=quiet)
def __init__(self, working_dir, build_system, vcs=None, ensure_latest=True, verbose=False): """Create a BuildProcess. Args: working_dir (str): Directory containing the package to build. build_system (`BuildSystem`): Build system used to build the package. vcs (`ReleaseVCS`): Version control system to use for the release process. If None, the package will only be built, not released. ensure_latest: If True, do not allow the release process to occur if an newer versioned package is already released. """ self.verbose = verbose self.working_dir = working_dir self.build_system = build_system self.vcs = vcs self.ensure_latest = ensure_latest if vcs and vcs.path != working_dir: raise BuildProcessError( "Build process was instantiated with a mismatched VCS instance" ) self.debug_print = config.debug_printer("package_release") self.package = get_developer_package(working_dir) hook_names = self.package.config.release_hooks or [] self.hooks = create_release_hooks(hook_names, working_dir) self.build_path = os.path.join(self.working_dir, self.package.config.build_directory)
def __init__(self, working_dir, build_system, package=None, vcs=None, ensure_latest=True, skip_repo_errors=False, ignore_existing_tag=False, verbose=False, quiet=False): """Create a BuildProcess. Args: working_dir (DEPRECATED): Ignored. build_system (`BuildSystem`): Build system used to build the package. package (DEPRECATED): Ignored. vcs (`ReleaseVCS`): Version control system to use for the release process. ensure_latest: If True, do not allow the release process to occur if an newer versioned package is already released. skip_repo_errors: If True, proceed with the release even when errors occur. BE CAREFUL using this option, it is here in case a package needs to be released urgently even though there is some problem with reading or writing the repository. ignore_existing_tag: Perform the release even if the repository is already tagged at the current version. If the config setting plugins.release_vcs.check_tag is False, this has no effect. verbose (bool): Verbose mode. quiet (bool): Quiet mode (overrides `verbose`). """ self.verbose = verbose and not quiet self.quiet = quiet self.build_system = build_system self.vcs = vcs self.ensure_latest = ensure_latest self.skip_repo_errors = skip_repo_errors self.ignore_existing_tag = ignore_existing_tag if vcs and vcs.pkg_root != self.working_dir: raise BuildProcessError( "Build process was instantiated with a mismatched VCS instance" ) if os.path.isabs(self.package.config.build_directory): self.build_path = self.package.config.build_directory else: self.build_path = os.path.join(self.working_dir, self.package.config.build_directory)
def __init__(self, working_dir, build_system, package=None, vcs=None, ensure_latest=True, skip_repo_errors=False, ignore_existing_tag=False, verbose=False): """Create a BuildProcess. Args: working_dir (str): Directory containing the package to build. build_system (`BuildSystem`): Build system used to build the package. vcs (`ReleaseVCS`): Version control system to use for the release process. ensure_latest: If True, do not allow the release process to occur if an newer versioned package is already released. skip_repo_errors: If True, proceed with the release even when errors occur. BE CAREFUL using this option, it is here in case a package needs to be released urgently even though there is some problem with reading or writing the repository. ignore_existing_tag: Perform the release even if the repository is already tagged at the current version. If the config setting plugins.release_vcs.check_tag is False, this has no effect. """ self.verbose = verbose self.working_dir = working_dir self.build_system = build_system self.vcs = vcs self.ensure_latest = ensure_latest self.skip_repo_errors = skip_repo_errors self.ignore_existing_tag = ignore_existing_tag if vcs and vcs.pkg_root != working_dir: raise BuildProcessError( "Build process was instantiated with a mismatched VCS instance" ) self.debug_print = config.debug_printer("package_release") self.package = package or get_developer_package(working_dir) hook_names = self.package.config.release_hooks or [] self.hooks = create_release_hooks(hook_names, working_dir) self.build_path = os.path.join(self.working_dir, self.package.config.build_directory)
def create_build_process(process_type, working_dir, build_system, vcs=None, ensure_latest=True, verbose=False): """Create a `BuildProcess` instance.""" from rez.plugin_managers import plugin_manager process_types = get_build_process_types() if process_type not in process_type: raise BuildProcessError("Unknown build process: %r" % process_type) cls = plugin_manager.get_plugin_class('build_process', process_type) return cls(working_dir, build_system=build_system, vcs=vcs, ensure_latest=ensure_latest, verbose=verbose)