Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid environment marker: platform_python_implementation #231

Closed
guettli opened this issue Apr 22, 2016 · 6 comments
Closed

Invalid environment marker: platform_python_implementation #231

guettli opened this issue Apr 22, 2016 · 6 comments

Comments

@guettli
Copy link

guettli commented Apr 22, 2016

I want to install html5lib editable and get this error:

host@host~$ pip install -e git+https://github.com/html5lib/html5lib-python.git#egg=html5lib
Obtaining html5lib from git+https://github.com/html5lib/html5lib-python.git#egg=html5lib
  Cloning https://github.com/html5lib/html5lib-python.git to ./src/html5lib
    Complete output from command python setup.py egg_info:
    error in html5lib setup command: Invalid environment marker: platform_python_implementation == 'CPython'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/foo_eins_d/src/html5lib

My pip version:

user@host:~$  pip --version
pip 7.1.2 from /home/foo_eins_d/local/lib/python2.7/site-packages (python 2.7)

Which version of pip is needed, or what else can I do to get pip install -e ... working?

@gsnedders
Copy link
Member

This is caused by a backwards incompatible change in setuptools. I can't find anything saying what version is needed quickly; sadly there's no way to be compatible with both old and new versions of setuptools. :(

I think we need setuptools 20.2?

@gsnedders
Copy link
Member

Perhaps pypa/setuptools#503 means that the legacy syntax works with v20.6.6? In which case we can move back to the legacy syntax then we only don't support support 20.2 to 20.6.5, but otherwise works.

@gsnedders
Copy link
Member

pypa/packaging#72 (comment) summarises this mess.

@gsnedders
Copy link
Member

Fixed by #234. We don't work with 20.2 to 20.6 (released mid-Feb till late-Mar 2016), but should work with both older and newer releases.

@gsnedders
Copy link
Member

Ergh. This is way worse than I thought. https://gsnedders.github.io/python-marker-test/results.html is a better summary of what supports what.

@gsnedders gsnedders reopened this Jun 6, 2016
@gsnedders
Copy link
Member

So the options are:

  • platform_python_implementation: doesn't work before 18.5 (except on Jython/IronPython!)
  • platform.python_implementation: doesn't work before 20.6.6
  • python_implementation: doesn't work before 20.10.0 on Jython/IronPython, and doesn't work between 20.2 and 20.10.0 on other implementations.

wrt system versions: platform_python_implementation will work with Ubuntu 16.04 LTS and Debian Jessie backports, but nothing older; python_implementation will work on Debain Jessie but won't work on Ubuntu 16.04 LTS though will work on every other release of Ubuntu from 14.04 LTS onwards. (RHEL is massively out of date and will always require an upgrade.)

On the whole I'm in favour of reverting to platform_python_implementation, although it limits the usefulness of the system setuptools. It also allows us to have identical markers in requirements files (consumed by pip) and in setup.py (consumed by setuptools).

gsnedders added a commit to gsnedders/html5lib-python that referenced this issue Jun 6, 2016
…entation

This makes us require setuptools>=18.5
gsnedders added a commit to gsnedders/html5lib-python that referenced this issue Jun 6, 2016
@gsnedders gsnedders modified the milestone: 0.99999999 Jun 6, 2016
gsnedders added a commit to gsnedders/html5lib-python that referenced this issue Jun 6, 2016
gsnedders added a commit to gsnedders/html5lib-python that referenced this issue Jun 6, 2016
…entation

This makes us require setuptools>=18.5
gsnedders added a commit to gsnedders/html5lib-python that referenced this issue Jun 6, 2016
…entation

This makes us require setuptools>=18.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants