Both pip (8.1.2) and setuptools (since 20.6.6) support a common format for environment markers, but wheel ignores the environment markers from requirements.txt.
Environment: OS X El Capitan, pip==8.2.1, setuptools==25.2.0, wheel=0.29.0, python 2.7.10.
I put together a tiny package to demonstrate this here: https://github.com/vitaly-krugl/wheel_marker_fail.
requirements.txt contains a single line: pycapnp==0.5.8 ; platform_system=='BestKeptSecret'
Pip correctly ignores pycapnp because platform_system doesn't match:
$ pip install -r requirements.txt --user Ignoring pycapnp: markers u"platform_system=='BestKeptSecret'" don't match your environment
In the demonstration package, setup.py reads the lines from requirements.txt and passes them to setuptools.setup() as the
install_requires arg. When I execute
python setup.py install, setuptools correctly ignores pycapnp, too.
Make an egg via
python setup.py bdist_egg and install via
easy_install --user dist/wheel_marker_fail-0.0.1-py2.7.egg also honors the markers.
But, unlike all of the other tools,
python setup.py bdist_wheel followed by
pip install dist/wheel_marker_fail-0.0.1-py2-none-any.whl --user ignores the environment makers and installs pycapnp anyway:
$ pip install dist/wheel_marker_fail-0.0.1-py2-none-any.whl --user Processing ./dist/wheel_marker_fail-0.0.1-py2-none-any.whl Collecting pycapnp==0.5.8 (from wheel-marker-fail==0.0.1) Installing collected packages: pycapnp, wheel-marker-fail Successfully installed pycapnp-0.5.8 wheel-marker-fail-0.0.1