Skip to content

sys_platform package specification is behaving differently than the same specification using markers #5884

@ChaoticRoman

Description

@ChaoticRoman

We have a project that is build on Linux, MacOS and Windows. On Linux, desktop integration use PyGObject, others work differently, so there was no need to install it on other platforms. So we put this into our Pipfile:

PyGObject = {version = "*", sys_platform = "=='linux'"}

Strangely pipenv was trying to install its dependencies on all platforms. After some trial and errors, this helped:

PyGObject = {version = "*", markers="sys_platform == 'linux'"}

I made replication of this issue using GitHub Actions and indeed, sys_platform = "=='linux'" and markers="sys_platform == 'linux'" versions behave differently. The first one is downloading requests on other platforms and installing its dependencies (though not intstalling requests themselves):

but the second one is not, it is working as you would expect (no unneeded downloads or deps installed):

Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions