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.

Revert use of environment markers in extras_require

See original GitHub issue

The use of an “environment marker” in the extras_require dict in #1018 is not compatible with earlier versions of Python 2:

python --version
pushd $(mktemp -d) >/dev/null
git clone -q https://github.com/docker/docker-py.git
virtualenv -q pip
virtualenv -q setuptools

source setuptools/bin/activate
pushd ./docker-py >/dev/null
python setup.py install >/dev/null
popd >/dev/null
pip freeze|grep ipaddress

source pip/bin/activate
pip install -qU pip
pushd ./docker-py  >/dev/null
pip install -q .
popd >/dev/null
pip freeze|grep ipaddress
popd >/dev/null

Output on Python 2.7.10

Python 2.7.10
py2-ipaddress==3.4.1
py2-ipaddress==3.4.1

Output on Python 2.7.3

Python 2.7.3
error in docker-py setup command: Invalid environment marker: python_version < "3"
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-XrHLjZ-build/

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

4reactions
shin-commented, May 18, 2016

There is no “fix” planned - this is not a bug. Please update your version of setuptools to support the environment marker syntax.

2reactions
shin-commented, Apr 1, 2016

Can this be fixed by updating your setuptools package? I just tested it with Python 2.7.7 and simply doing pip install -U setuptools seems to solve the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I use Environment Markers in tests_require in setup.py?
Yes, you can. Append the environment marker to each relevant element of tests_require , separated by a semicolon, e.g.:
Read more >
Consider using PEP 508 environment markers with ...
Consider using PEP 508 environment markers with extras_require ; Resolution: Unresolved ; Affects Version/s: None ; Fix Version/s: None ; Component/ ...
Read more >
Can `extras_require` values be OS dependant?
I have a extras_require in my package that looks as follows: ... it's the standard definition of environment markers from PEP 496.
Read more >
Dependencies Management in Setuptools
The environmental markers that may be used for testing platform types are detailed in PEP 508. See also. If environment markers are not...
Read more >
Teach pbr to read extras and env markers - OpenDev
It also adds support for handling environment markers, both in the extras section and in install_requires and in requirements.txt. Change-Id: ...
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