How to use perform_isolated_build method in tox

Best Python code snippet using tox_python

isolated.py

Source:isolated.py Github

copy

Full Screen

...31 if build_requires_dep:32 with package_venv.new_action("build_requires", package_venv.envconfig.envdir) as action:33 package_venv.run_install_command(packages=build_requires_dep, action=action)34 package_venv.finishvenv()35 return perform_isolated_build(build_info, package_venv, config.distdir, config.setupdir)36def get_build_info(folder):37 toml_file = folder.join("pyproject.toml")38 # as per https://www.python.org/dev/peps/pep-0517/39 def abort(message):40 reporter.error("{} inside {}".format(message, toml_file))41 raise SystemExit(1)42 if not toml_file.exists():43 reporter.error("missing {}".format(toml_file))44 raise SystemExit(1)45 config_data = get_py_project_toml(toml_file)46 if "build-system" not in config_data:47 abort("build-system section missing")48 build_system = config_data["build-system"]49 if "requires" not in build_system:50 abort("missing requires key at build-system section")51 if "build-backend" not in build_system:52 abort("missing build-backend key at build-system section")53 requires = build_system["requires"]54 if not isinstance(requires, list) or not all(isinstance(i, six.text_type) for i in requires):55 abort("requires key at build-system section must be a list of string")56 backend = build_system["build-backend"]57 if not isinstance(backend, six.text_type):58 abort("build-backend key at build-system section must be a string")59 args = backend.split(":")60 module = args[0]61 obj = args[1] if len(args) > 1 else ""62 return BuildInfo(requires, module, obj)63def perform_isolated_build(build_info, package_venv, dist_dir, setup_dir):64 with package_venv.new_action(65 "perform-isolated-build", package_venv.envconfig.envdir66 ) as action:67 # need to start with an empty (but existing) source distribution folder68 if dist_dir.exists():69 dist_dir.remove(rec=1, ignore_errors=True)70 dist_dir.ensure_dir()71 result = package_venv._pcall(72 [73 package_venv.envconfig.envpython,74 BUILD_ISOLATED,75 str(dist_dir),76 build_info.backend_module,77 build_info.backend_object,...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tox automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful