mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1712133: Synchronize virtualenv requirement parsing logic r=ahal
The `mach_bootstrap:search_path()` implementation is out of date compared to `virtualenv.py`. Since `python2:`, `python3:` and `optional:` packages are no longer valid virtualenv requirement actions, they can be removed. Differential Revision: https://phabricator.services.mozilla.com/D117707
This commit is contained in:
parent
1b74e5a575
commit
318ecaf9b2
@ -147,13 +147,6 @@ def search_path(mozilla_dir, packages_txt):
|
||||
packages = [line.rstrip().split(":") for line in f]
|
||||
|
||||
def handle_package(package):
|
||||
if package[0] == "optional":
|
||||
try:
|
||||
for path in handle_package(package[1:]):
|
||||
yield path
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if package[0] in ("windows", "!windows"):
|
||||
for_win = not package[0].startswith("!")
|
||||
is_win = sys.platform == "win32"
|
||||
@ -161,13 +154,6 @@ def search_path(mozilla_dir, packages_txt):
|
||||
for path in handle_package(package[1:]):
|
||||
yield path
|
||||
|
||||
if package[0] in ("python2", "python3"):
|
||||
for_python3 = package[0].endswith("3")
|
||||
is_python3 = sys.version_info[0] > 2
|
||||
if is_python3 == for_python3:
|
||||
for path in handle_package(package[1:]):
|
||||
yield path
|
||||
|
||||
if package[0] == "packages.txt":
|
||||
assert len(package) == 2
|
||||
for p in search_path(mozilla_dir, package[1]):
|
||||
|
Loading…
Reference in New Issue
Block a user