setuptools: Packages are not ignored on specific platforms with 38.2.0

We define this for our library (https://github.com/rm-hull/luma.led_matrix/blob/master/setup.py#L41):

install_requires = [
    'luma.core>=1.1.1',
    'rpi_ws281x;platform_machine=="armv7l" and platform_system=="Linux"',
    'ws2812;platform_machine=="armv7l" and platform_system=="Linux"'
]

Because these last 2 packages should only be installed on ARM systems. But it seems this broke in 38.2.0 (our travis started complaining).

$ pip install --ignore-installed --upgrade setuptools pip tox

Collecting setuptools

  Using cached setuptools-38.2.0-py2.py3-none-any.whl

Collecting pip

  Using cached pip-9.0.1-py2.py3-none-any.whl

Collecting tox

  Using cached tox-2.9.1-py2.py3-none-any.whl

Collecting virtualenv>=1.11.2; python_version != "3.2" (from tox)

  Using cached virtualenv-15.1.0-py2.py3-none-any.whl

Collecting py>=1.4.17 (from tox)

  Using cached py-1.5.2-py2.py3-none-any.whl

Collecting six (from tox)

  Using cached six-1.11.0-py2.py3-none-any.whl

Collecting pluggy<1.0,>=0.3.0 (from tox)

Installing collected packages: setuptools, pip, virtualenv, py, six, pluggy, tox

Successfully installed pip-9.0.1 pluggy-0.6.0 py-1.5.2 setuptools-38.2.0 six-1.11.0 tox-2.9.1 virtualenv-15.1.0

And then later you see they’re installed anyway:

  Using cached pygame-1.9.3-cp27-cp27mu-manylinux1_x86_64.whl

Collecting ws2812 (from luma.led_matrix>=1.0.6->luma.examples==0.0.0)

Collecting rpi-ws281x (from luma.led_matrix>=1.0.6->luma.examples==0.0.0)

  Using cached rpi_ws281x-3.0.4.tar.gz

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (20 by maintainers)

Most upvoted comments

what version of setuptools did you use to generate the wheel for luma.led_matrix?

It was 36.0.1

Have now updated to 38.2.1

Yes! That’s what setuptools>=36.2.0 does internally, move requirements with markers from install_requires to extras_require with the syntax:

':{marker}': [requirements]

Thanks, will take a look and get back to you (and hopefully close this ticket).

  • short term fix: regenerate the wheel for the latest version of luma.led_matrix with setuptools>=36.2.0
  • long term fix: I suggest using extras_require to avoid invalid wheels when using setuptools<36.2.0