Skip to content

OS dependent dependencies #1392

Discussion options

You must be logged in to vote

You can specify platform-dependent dependencies directly in the pyproject.toml. Some more info here.

As an example, my dependencies in the pyproject.toml of one project looks something like this:

dependencies = [
    "click>=8.1.7",
    "dmgbuild>=1.6.1; sys_platform=='darwin'",
]

Here, click is installed on any platform, dmgbuild only if sys_platform is equal to darwin.

Hope this helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@patrick-egenlauf
Comment options

Answer selected by patrick-egenlauf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants