-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python: use built-in venv instead of virtualenv when installing formulae #10039
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review period will end on 2020-12-17 at 17:41:06 UTC. |
1 similar comment
Review period will end on 2020-12-17 at 17:41:06 UTC. |
BrewTestBot
added
the
waiting for feedback
Merging is blocked until sufficient time has passed for review
label
Dec 16, 2020
MikeMcQuaid
approved these changes
Dec 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to see us go in this direction. Nice work @dtrodrigues!
BrewTestBot
removed
the
waiting for feedback
Merging is blocked until sufficient time has passed for review
label
Dec 17, 2020
Review period ended. |
BrewTestBot
approved these changes
Dec 17, 2020
5 tasks
7 tasks
MikeMcQuaid
approved these changes
Jan 5, 2021
Nice work, thanks @dtrodrigues! |
5 tasks
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?This PR uses python's built-in
venv
to install formulae instead of the externalvirtualenv
, which has dependencies and needs to be bootstrapped. The dependencies could also theoretically differ based on Python version.Current caveat:
venv
usesensurepip
to installpip
andsetuptools
using the wheels that are bundled with cpython, even if a newer one is installed, which is 20.2.3 for pip and 49.2.1 for setuptools in Python 3.9.1: https://github.com/python/cpython/blob/1e5d33e9b9b8631b36f061103a30208b206fd03a/Lib/ensurepip/__init__.py#L16-L18, https://github.com/python/cpython/tree/1e5d33e9b9b8631b36f061103a30208b206fd03a/Lib/ensurepip/_bundledOther downstream package managers patch
ensurepip
to point to their locally managedpip
andsetuptools
: https://src.fedoraproject.org/rpms/python3.9/blob/2084e749c71fe494a9a4ed76ce9c2d149b76868c/f/00189-use-rpm-wheels.patch, so that's a possible solution to ensure the temporary installationvenv
is using the latest versions that Homebrew knows about vs either using a known outdated version or blindly using the latest available in PyPI.Marking as a draft for now and can look into writing new tests if it's decided to go in this direction.
Follow-up to #9435.