-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
Export a matrix of resolve+python versions #15817
Comments
As far as selecting the resolves goes, that is probably related to these:
And about selecting the python version, these are probably related:
|
I just found (err - found again, because I forgot about it) the add/remove option syntax: https://www.pantsbuild.org/docs/options#addremove-semantics So, with my venvs already exported using python 3.6, I tried running this:
But, that deleted the python3.6 venvs instead of just adding the 3.8 venvs. I want to have both. |
I think we in general could benefit from |
These improve the UX for selecting which resolve to export (landing in 2.15.x):
These facilitate allowing multiple export invocations, and creating multiple venv exports per resolve (for multiple interpreters) (landing in 2.16.x):
Related issue: Now, we need some more usability features to allow selecting the python version or range of versions to export venvs for. |
Is your feature request related to a problem? Please describe.
I would like to export venvs for multiple python versions in each of my resolves.
I keep an one instance of every major python version (2.7 and 3.4+) available on my dev box. When resolving the interpreter, pants/pex defaults to the lowest available that meets the given constraints. That's fine, until I want to work with a particular python version.
Describe the solution you'd like
Enhance python venv exports so that they multiple python versions can be exported for each resolve.
The default behavior is fine: one venv for each resolve using the lowest python version in the interpreter constraints.
In the python backend, add two options to the
export
subsystem that allows a user to:Describe alternatives you've considered
It could create a venv for each python version that is (a) available locally, and (b) matches the interpreter constraints.
That seems a bit too shotgun. I'm happy to guide pants as to which venvs I want created.
Additional context
./pants export ::
Here is the pants.toml in the project I'm using to play with this: https://github.com/st2sandbox/st2/blob/pants/pants.toml#L112-L138
It's got multiple resolves, one of which has a different set of intepreter constraints (pants-plugins follows pants' constraints, not my project's constraints).
I don't need tool resolves to have this behavior (at this point).
So, I want to get this matrix of virtualenvs (only some can be exported today, indicated by
+
in the today column):This is where the matrix is generated today:
pants/src/python/pants/backend/python/goals/export.py
Lines 212 to 218 in a53a94a
I'm not sure how to add extra cli args for the
export
goal or how to determine the python version to use here.The text was updated successfully, but these errors were encountered: