Skip to content

pip sometimes builds install_requires dep AFTER project, which forces cython .pxd imports to be either setup_requires (breaks cython) or pep517 (breaks wheels and therefore tox) #6406

@ghost

Description

Ok, so I tried to use tox, and it runs the following command:

cmdargs: '/home/jonas/Develop/myproject/.tox/py37/bin/python -m pip install --no-deps -U \'/home/jonas/Develop/myproject/.tox/dist/myproject-0.6.zip\''

myproject has an install_requires dependency on wobblui, from which it will attempt to .pxd import things. (Cython's cimport)

Now what pip does is build the wheels in this order:

Building wheels for collected packages: myproject, wobblui, nettools
  Building wheel for myproject (setup.py): started

Please note this builds myproject BEFORE it's install_requires dependency. As a result, unsurprisingly, the build fails.

Now this is somewhat problematic because:

Therefore, I think pip should just not do that. Please make it build things always such that install_requires is build first, it brings a host of other troubles for .pxd cross-package cimports/Cython if it just jumbles the order around

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions