Skip to content
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

Allow specifying values for environment markers during install #9981

Closed
ronaldoussoren opened this issue May 14, 2021 · 4 comments
Closed

Allow specifying values for environment markers during install #9981

ronaldoussoren opened this issue May 14, 2021 · 4 comments
Labels
type: feature request Request for a new feature

Comments

@ronaldoussoren
Copy link

What's the problem this feature will solve?
Pip currently allows you to specify some, but not all values for environment markers during install (for example the --platform and --implementation options). PEP 496 specifies a number of environment markers that cannot be specified at the moment (in particular os_name and platform_release).

Describe the solution you'd like

Add options --platform-release VALUE and --os-name VALUE to specify the value of platform_release and os_name during the evaluation of platform markers.

My reason for filing the issue is this PyObjC issue: ronaldoussoren/pyobjc#354

This asks for a way to install all sub packages of PyObjC using the pyobjc umbrella package, which uses platform_release to select sub packages that are relevant for the current machine. IMHO the current place to enable this is in pip, not in PyObjC.

Alternative Solutions
I've spent little time to thing about this, but the current workaround for my users is to specify all sub packages manually.

Additional context
None

@uranusjr uranusjr added the type: feature request Request for a new feature label May 18, 2021
@uranusjr
Copy link
Member

Technically --platform and --implementation are for selecting wheels, not populating PEP 496 environment markers, so this is an entirely different . But this does sound like a reasonable feature request to me.

Mapping markers directly into options feels wrong to me since there are much too many (and may grow in the future). I wonder whether it would be better to come up with some mini-syntax for this, e.g.

pip install --marker="os_name='nt'" --marker="platform_release='...'"

This would avoid the dash-to-underscore conversion as well (which also annoys me slightly).

@aivarannamaa
Copy link

aivarannamaa commented May 23, 2021

Pip currently allows you to specify some, but not all values for environment markers during install (for example the --platform and --implementation options).

According to my experiments, --implementation is ignored when filtering dependencies.

I would also like the possibility to override environment markers, so that https://github.com/aivarannamaa/minipip/ could be more flexible in collecting content for installation to MicroPython and CircuitPython devices. The --marker option looks like a good solution.

@notatallshaw
Copy link
Member

This is now being tracked via #11664 ?

@sbidoul
Copy link
Member

sbidoul commented Apr 23, 2023

This is now being tracked via #11664 ?

I think so, yes.

@sbidoul sbidoul closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants