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

How to manage platform specific sub-dependencies #4408

Closed
nealkruis opened this issue Jul 30, 2020 · 1 comment
Closed

How to manage platform specific sub-dependencies #4408

nealkruis opened this issue Jul 30, 2020 · 1 comment
Labels
Type: Question ❔ This is a question or a request for support.

Comments

@nealkruis
Copy link

My example is that I am using doit for task automation, which includes macfsevents as an extra_requires on macOS.

In most cases, platform specific dependencies should be harmless on other operating systems. The real problem is that this particular dependency fails to install on other operating systems. The only way I have found to get around this is to remove the entry in the lock file (things still work fine on macOS without it--though I don't know if this is reliably the case for other sub-dependencies).

There's some related discussion in #3902.

My questions are:

  1. Should pipenv be setting a platform specific marker for this sub-dependency and others in the extra_requires field?
  2. Is there a method in the Pipfile to tell the environment to ignore specific sub-dependencies, or an alternative workaround where I don't have to modify the lock file?
@frostming
Copy link
Contributor

If that is the case, you should mark the sub-dependencies in Pipfile as platform-specific, in the following way:

[packages]
macfsevents = {version="*", sys_platform="=='darwin'"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question ❔ This is a question or a request for support.
Projects
None yet
Development

No branches or pull requests

2 participants