Stop using pipenv to manage virtualenvs
Categories
(Testing :: Python Test, task, P3)
Tracking
(Not tracked)
People
(Reporter: ahal, Unassigned)
References
Details
Attachments
(1 obsolete file)
We'd like to deprecate the use of Pipenv in mozilla-central. It ended up not being a great fit, is much larger than we need and is causing issues when trying to upgrade our vendored copy of virtualenv
.
The main reason we use pipenv
in mach python-test
is to:
- Find a Python binary given a version (e.g, "2.7", "3", "3.6", etc).
- Create the virtualenv for us.
The former can be handled by this library, which is much lighterweight and is what Pipenv itself uses. The latter can be handled by VirtualenvManager
.
Reporter | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
I'm +1 on using a light-weight focused library that tries to do one thing really well. pythonfinder
appears to cover the functionality of mozbuild.pythonutil.find_python3_executable()
, mozfile.which()
, shutil.which()
, pipenv
's python finder feature, and a dozen other which()
functions scattered through the codebase. It would be nice if the Python build infrastructure had a single go-to library to handle this functionality.
I assume the intention is to use this just for the python-test command first?
Reporter | ||
Comment 3•6 years ago
|
||
It's debatable if we even need pythonfinder
for this case (instead of which python3
). I'd tend to stick with which
for now and if we find there's a need to use pythonfinder
in the future, we can make that switch in a follow-up.
Reporter | ||
Comment 4•6 years ago
|
||
Just to update status.. the attached patch causes a failure in the configure tests. I'm not actively working on fixing it.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
At this point it's better to spend effort wrapping up the Python 3 migration and removing all Python 2 tests from the tree. At which point we won't need this Pipenv hack to jump between the two. We'll just go back to using the default version that mach runs with.
Updated•5 years ago
|
Description
•