Bug 1712151: Add test to verify virtualenv compatibility r=ahal

This adds two main compatibility guarantees:
1. Vendored dependencies <=> Pypi-downloaded dependencies
2. Global Mach dependencies <=> command-specific dependencies

As part of this, a new `vendored:` action was added to the virtualenv
definition format. Otherwise similar to `pth:` paths, `vendored:`
packages are assumed to be "pip install"-able.

Some validation (the `.dist-info`/`PKG-INFO` checks) was added to
`requirements.py` to verify that `pth:` and `vendored:` are correctly
used.

Differential Revision: https://phabricator.services.mozilla.com/D122900
This commit is contained in:
Mitchell Hentges
2021-09-28 14:59:28 +00:00
parent 2e31db3870
commit 03bd43fee8
10 changed files with 261 additions and 85 deletions

View File

@@ -81,6 +81,7 @@ def python(
append_env["PYTHONPATH"] = os.pathsep.join(
os.path.join(command_context.topsrcdir, pth.path)
for pth in requirements.pth_requirements
+ requirements.vendored_requirements
)
else:
command_context.virtualenv_manager.ensure()