def __init__(self, profile_abs_path, reference, conan_api, uploader, exclude_vcvars_precommand=False, build_policy=None, runner=None, cwd=None, printer=None, upload=False, upload_only_recipe=None, test_folder=None, config_url=None, config_args=None, upload_dependencies=None, conanfile=None, skip_recipe_export=False, update_dependencies=False, lockfile=None): self.printer = printer or Printer() self._cwd = cwd or os.getcwd() self._uploader = uploader self._upload = upload self._conan_api = conan_api self._profile_abs_path = profile_abs_path self._reference = reference self._exclude_vcvars_precommand = exclude_vcvars_precommand self._build_policy = build_policy.split(",") if \ isinstance(build_policy, str) else \ build_policy self._runner = PrintRunner(runner or os.system, self.printer) self._test_folder = test_folder self._config_url = config_url self._config_args = config_args self._upload_only_recipe = upload_only_recipe self._conanfile = conanfile self._lockfile = lockfile self._upload_dependencies = upload_dependencies.split(",") if \ isinstance(upload_dependencies, str) else \ upload_dependencies self._upload_dependencies = self._upload_dependencies or [] self.skip_recipe_export = skip_recipe_export self._update_dependencies = update_dependencies self._results = None patch_default_base_profile(conan_api, profile_abs_path) client_version = get_client_version() if client_version < Version("1.12.0"): cache = self._conan_api._client_cache elif client_version < Version("1.18.0"): cache = self._conan_api._cache else: if not conan_api.app: conan_api.create_app() cache = conan_api.app.cache self._profile = load_profile(profile_abs_path, cache)
def __init__(self, profile_abs_path, reference, conan_api, uploader, exclude_vcvars_precommand=False, build_policy=None, runner=None, cwd=None, printer=None, upload=False, test_folder=None, config_url=None): self.printer = printer or Printer() self._cwd = cwd or os.getcwd() self._uploader = uploader self._upload = upload self._conan_api = conan_api self._profile_abs_path = profile_abs_path self._reference = reference self._exclude_vcvars_precommand = exclude_vcvars_precommand self._build_policy = build_policy self._runner = PrintRunner(runner or os.system, self.printer) self._uploader.remote_manager.add_remotes_to_conan() self._test_folder = test_folder self._config_url = config_url patch_default_base_profile(conan_api, profile_abs_path) if Version(client_version) < Version("1.12.0"): cache = self._conan_api._client_cache else: cache = self._conan_api._cache self._profile = load_profile(profile_abs_path, cache)
def __init__(self, profile_abs_path, reference, conan_api, uploader, args=None, exclude_vcvars_precommand=False, build_policy=None, runner=None, abs_folder=None, printer=None, upload=False): self.printer = printer or Printer() self._abs_folder = abs_folder or os.getcwd() self._uploader = uploader self._upload = upload self._conan_api = conan_api self._profile_abs_path = profile_abs_path self._reference = reference self._args = args self._exclude_vcvars_precommand = exclude_vcvars_precommand self._build_policy = build_policy self._runner = PrintRunner(runner or os.system, self.printer) self._uploader.remote_manager.add_remotes_to_conan() patch_default_base_profile(conan_api, profile_abs_path) self._profile = load_profile(profile_abs_path, self._conan_api._client_cache)