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

Add support for local version identifiers #7989

Closed
gideongrinberg opened this issue May 21, 2020 · 2 comments
Closed

Add support for local version identifiers #7989

gideongrinberg opened this issue May 21, 2020 · 2 comments

Comments

@gideongrinberg
Copy link

tl;dr: Add support for Local Version Identifiers (i.e. pip install torch+cpu or poetry add package+windows)

What's the problem this feature will solve?
PyPi should support local version identifiers, so you could have something like torch+cpu in the same package as torch, and directly pip install torch+cpu or poetry add torch+cpu instead of pip3 install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html. I also see how this could work for packages that use different wheels for different OSs. I found a number of places this could be useful, including pytorch/pytorch#26340. Additionally, PEP #440 calls for use of local version identifiers, so it makes sense for PyPi to support them. Overall, this would simplify installation for a number of packages, and improve PyPi, especially in regard to how it works with package managers like Poetry

Describe the solution you'd like
Add support for Local Version Identifiers (i.e. pip install torch+cpu or poetry add package+windows)

@pradyunsg
Copy link
Contributor

pradyunsg commented May 21, 2020

From PEP 440:

Local version identifiers SHOULD NOT be used when publishing upstream projects to a public index server, but MAY be used to identify private builds created directly from the project source.


Are you looking for more granular environment markers or something to determine dependencies based on the target system's hardware capabilities?

@di
Copy link
Member

di commented Jun 19, 2020

Thanks for feature request.

Closing since PEP 440 explicitly states that local versions should not be used on upstream indices like PyPI.

@di di closed this as completed Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants