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.

Handle conditional install_requires wrongly

See original GitHub issue
Issue description

Handle conditional install_requires wrongly.

Given a setup.py snippet:

setup(
    ...
    install_requires={
        'futures; python_version == "2.7"'
    }
)

pipenv install package in Python3 env cannot rightly ignore this requirement but installs futures==3.1.1 which is the last version for Python3.

pipenv, version 2018.7.1

Expected result

futures doesn’t get installed and listed in Pipfile.lock at all.

Actual result

futures==3.1.1 gets installed and listed in Pipfile.lock.

Steps to replicate

pipenv install azure-cosmosdb-table in Python3.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Jul 12, 2018

I’m always happy to help out this kind of problems. Hopefully with every issue I find we get one step closer to a perfect Python packaging world 🙂

0reactions
udacommented, Feb 18, 2019

I encountered this issue as well. I tried to install pytest-sanic==0.1.15, which requires aiohttp, which in turn requires idna-ssl>=1.0 if python version is less than 3.7.

but, idna-ssl was not installed using pipenv. I checked the wheel’s METADATA it has Requires-Dist: idna-ssl (>=1.0) ; python_version < "3.7".

I have en environment using python 3.6.8, pipenv 2018.11.26.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conditional requirements in setup.py - Stack Overflow
This allows for the declarative syntax of setup.cfg , but tweaks the install_requires value if the installation target is an Alpine system.
Read more >
Conditional package install depending on other packages in ...
I feel like package metadata ends up too often being incorrect or out of date, and then it is hard to fix (maintainers...
Read more >
Conditional Python Dependencies - Hynek Schlawack
On the installation side the requirements appear to be a lot looser: pip 1.4 should be fine. Older version will flat-out crash on...
Read more >
py2app Documentation
Issue #26: py2app copied the wrong executable into the application bundle when using virtualenv with a frame- work build of Python. 1.13.35 ...
Read more >
History | Poetry - Python dependency management and ...
Fixed various issues with the way extra markers in dependencies were handled. Fixed the option conflicts in the run command. Fixed wrong latest...
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