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

Can't specify mutually exclusive dependencies #432

Open
adigitoleo opened this issue Jan 26, 2021 · 0 comments
Open

Can't specify mutually exclusive dependencies #432

adigitoleo opened this issue Jan 26, 2021 · 0 comments

Comments

@adigitoleo
Copy link

Hi, and thank you for your continued effort to improve Python packaging!

It would be nice to have a mechanism for specifying mutually exclusive dependencies.
I posted about this on reddit before being informed that it is not currently supported. The motivation is to allow flexibility in "backends" or frameworks, where one and only one of multiple dependency choices are required to use the package/library.

Parallelisation is one example (e.g. ray vs charm4py) but I imagine this would be even more valuable in situations where one of many substitute dependencies is strictly required for the package to work at all, maybe python GUI bindings that can switch between PySide and PyQt backends for example...

From the documentation of enaml, emphasis mine:

Enaml’s declarative widgets provide a layer of abstraction on top of the widgets of a toolkit rendering library. You will need to install this dependency separately.

For users, this is probably just an inconvenience and potential stumbling block if they don't read the docs or miss that part. For distribution packagers or admins this could be a bigger issue, although I'm not very experienced in that side of things.

I appreciate that this would require considerable effort and changes to dependency resolution. Maybe it's not worth the hassle? I'm just putting this out there because I stumbled across it as mentioned above. I'm also aware that in Arch Linux packages can specify if the provide equivalent features to, conflict with or replace another package. See this wiki, specifically the sections about provides, conflicts and replaces. I imagine that other system package managers work in a similar way (but I really don't know). Maybe that's the realm of system packagers rather than pip/setuptools?

Cheers,
Leon

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

1 participant