python-hyper / hyper

HTTP/2 for Python.
http://hyper.rtfd.org/en/latest/
MIT License
1.05k stars 192 forks source link

When setuptools 5.5.1: error in hyper setup command: Invalid environment marker: platform_python_implementation == "PyPy" and python_full_version < "2.7.9" #279

Closed nicholas-gh closed 8 years ago

nicholas-gh commented 8 years ago

When I was using python3-setuptools 5.5.1-1 I get:

$ pip3 install git+https://github.com/Lukasa/hyper.git@development
Downloading/unpacking git+https://github.com/Lukasa/hyper.git@development
  Cloning https://github.com/Lukasa/hyper.git (to development) to /tmp/pip-3r5q8neh-build
  Running setup.py (path:/tmp/pip-3r5q8neh-build/setup.py) egg_info for package from git+https://github.com/Lukasa/hyper.git@development
    error in hyper setup command: Invalid environment marker: platform_python_implementation == "PyPy" and python_full_version < "2.7.9"
    Complete output from command python setup.py egg_info:
    error in hyper setup command: Invalid environment marker: platform_python_implementation == "PyPy" and python_full_version < "2.7.9"

I upgraded to python3-setuptools 20.10.1-1.1~bpo8+1 (and python3-pkg-resources 20.10.1-1.1~bpo8+1 was added at the same time)

sudo apt-get install -t jessie-backports python3-setuptools

and now setuptools processes git+https://github.com/Lukasa/hyper.git@development just fine.

However, on raspbian only 5.5.1-1 of setuptools is available. /etc/debian_version on the Rasberry Pi running raspbian says 8.0.

I expect this was introduced in https://github.com/Lukasa/hyper/commit/d2bc406de42cdb2ef2b9e8b01b09ae8ba362e474#diff-2eeaed663bd0d25b7e608891384b7298 and probably isn't a bug, as such. https://github.com/docker/docker-py/issues/1019 has the same issue.

However, it's a shame that it doesn't install on raspbian without hand hacking the setup.py (or maybe attempting to upgrade setuptools with pip to latest, which I didn't try yet.)

Lukasa commented 8 years ago

Yeah, sorry about this: this was definitely added on purpose and it's not considered a bug. I'm afraid you'll need to discuss with the raspbian folks to look for them to backport the updated setuptools. Alternatively, you can consider using virtualenv to store your environment, which will allow you to safely update setuptools within the virtualenv.

I appreciate that this is inconvenient, but setuptools 5.5.1 was released in August 2014, and it's probably time for an upgrade. =)

nicholas-gh commented 8 years ago

Thanks! Hopefully having it reported here will help people find the cause of the error and find a way to upgrade themselves.