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

Mechanism for multiple packages to provide the same virtual package #8669

Open
frankier opened this issue Jul 31, 2020 · 2 comments
Open

Mechanism for multiple packages to provide the same virtual package #8669

frankier opened this issue Jul 31, 2020 · 2 comments
Labels
resolution: needs standard Should be agreed as a standard before implementation state: needs discussion This needs some more discussion type: enhancement Improvements to functionality

Comments

@frankier
Copy link

What's the problem this feature will solve?

Currently some libraries have multiple packages on PyPI to fulfill different use cases. For example:

psycopg2 vs psycopg2-binary: These packages provide psycopg2 without and with a wheel package, due to problems the maintainers have had with wheel packages. The two packages logically provide the same library but only the latter will install a wheel. The problem relates to linking with compatible versions of libssl. See: psycopg/psycopg2#674

opencv-python-headless vs opencv-python: The latter has GUI functionality whereas the former doesn't.

There are probably others e.g. "foo" and "foo-gpu" may exist for some packages. Please go ahead and comment with more examples.

Describe the solution you'd like
Multiple packages would be able to "provide" the same resource, specified e.g. in the pyproject.toml.

Any downstream package could then decide on which concrete package they wanted to provide the virtual package. There could be some way of choosing a default.

Additional context
This functionality could become more important when dependency resolution becomes more strict. See also: #8076

Other package management systems have this mechanism. See e.g. https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides

@uranusjr
Copy link
Member

Would you mind opening a thread on discuss.python.org? This requires multiple things in the packaging ecosystem to work, and pip is arguably one of the last. And a PEP would be required, if I’m not mistaken. Some of the people on there may be able to offer more thoughts about this.

@uranusjr uranusjr added resolution: needs standard Should be agreed as a standard before implementation state: needs discussion This needs some more discussion labels Jul 31, 2020
@triage-new-issues triage-new-issues bot removed S: needs triage Issues/PRs that need to be triaged labels Jul 31, 2020
@uranusjr uranusjr added the type: enhancement Improvements to functionality label Jul 31, 2020
@pfmoore
Copy link
Member

pfmoore commented Jul 31, 2020

Agreed, this would need discussion. I believe it's also been discussed previously, so you might want to research the history (a good thing to search for is probably the Provides-Dist metadata item) as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: needs standard Should be agreed as a standard before implementation state: needs discussion This needs some more discussion type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

3 participants