Tweak inherit-from-parent-environment implementation in virtualenv.py
Categories
(Firefox Build System :: General, task)
Tracking
(firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: rstewart, Assigned: rstewart)
References
Details
Attachments
(1 file)
Assignee | ||
Comment 1•4 years ago
|
||
The intended behavior of inherit-from-parent-environment
is that the packages from the parent Python environment are available to the sub-virtualenv
. The implementation of that behavior thus far has been around "site directories", the idea being that custom (non-stdlib) packages are likely to be installed in the "site directory". The limitation of this approach is that there's no one location, in practice, where packages are installed, and it's hard to enumerate a static list of all those possible locations across all platforms.
This patch circumvents the issue by ignoring the "site directory" question entirely and just looking at sys.path
. If we're inheriting from the parent environment when creating a virtualenv
, we just ask the parent Python what its sys.path
is and configure the virtualenv
's sys.path
on startup.
Pushed by rstewart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f50e4bee2efb Tweak `inherit-from-parent-environment` implementation in `virtualenv.py` r=ahal
Comment 3•4 years ago
|
||
bugherder |
Comment 4•4 years ago
|
||
This PR regressed build on Arch Linux:
0:02.65 File "/projects/mozilla-unified/build/moz.configure/init.configure", line 382, in virtualenv_python3
0:02.65 if not distutils.sysconfig.get_python_lib():
0:02.65 AttributeError: module 'distutils' has no attribute 'sysconfig'
0:02.66 *** Fix above errors and then restart with\
0:02.66 "./mach build"
0:02.66 make: *** [client.mk:115: configure] Error 1
Assignee | ||
Comment 5•4 years ago
|
||
Bug 1662130 will track that.
Description
•