question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transitive dependencies don't honor conditionals of required package

See original GitHub issue

Issue description

I have a package with an os_name condition in my Pipfile:

cffi = {version = "*", os_name = "=='nt'"}

pipenv adds the package to Pipfile.lock, which is expected. When installing (e.g. pipenv sync), there is a message about skipping install of the package which doesn’t match:

Ignoring cffi: markers 'os_name == "nt"' don't match your environment

Fine so far. However, the conditional package has a dependency (pycparser). pipenv sync installs the dependency despite the required package not matching my environment.

Expected result

pipenv should not install transitive dependencies of packages which don’t match the environment

Actual result

pipenv is installing transitive dependencies (pycparser in this case)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andreparamescommented, Nov 28, 2019

Hi, we’re hitting the same bug (trying to import pyobjc only on macOS). Has there been any movement in this ticket? If not, I may have a crack at it this weekend.

0reactions
matteiuscommented, Aug 26, 2022

Could this be rechecked with pipenv==2022.8.24? There is a fair chance it is still an issue, but I am trying to hone in on which old issue reports are still relevant.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude all transitive dependencies of a single dependency
If you put the dependency with the exclusions in the dependencyManagement section of either the parent POM for your project, or in an...
Read more >
Locking transitive Dependencies with NPM - Reflectoring
This post describes an important caveat when declaring “soft” dependencies using NPM and how to lock these dependencies to avoid problems.
Read more >
NuGet Package Dependency Resolution - Microsoft Learn
Transitive restore applies four main rules to resolve dependencies: lowest applicable version, floating versions, direct-dependency-wins, and ...
Read more >
Maven – Optional Dependencies and Dependency Exclusions
The answer is Yes. Project-A has declared that it doesn't need Project-D to run, so it won't be brought in as a transitive...
Read more >
Simplifying Python Builds. A Single Source of Truth for…
Why put your required dependencies in multiple locations when one will suffice? ... If a version/range is specified in the Pipfile honor it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found