Closed wshanks closed 4 years ago
Ping? This is annoying when you are using a non-standard PyPI repo because setup_requires
ignores any settings I have tried and still goes to pypi.org.
A different solution is to put the requirement in setup.cfg. See an example at https://github.com/django-haystack/django-haystack/pull/1686
On the user side, the workarounds I have found are:
find_links
entry to .pydistutils.cfg
as described in my second link above. I found this approach too fragile for my use case.setup_requires
package as an additional explicit requirement to your project. The only ones I have encountered so far are pytest-runner
and setuptools-scm
and they are both lightweight dependencies. EDIT: actually, it is a little more involved than this. You need to install dependencies in two steps. First install the setup_requires
package(s). Then install all of your normal dependenices. If you just add the setup_requires
packages as additional dependencies, pip
won't recognize them as dependencies of the packages that list them in setup_requires
and might still try to install the package that needs the setup_requires
package before installing the setup_requires
package.@willsALMANJ @ecederstrand Thank you for your PR, and sorry for your inconvenience. Just merged!
@slaypni Thanks for merging this.
Would it be possible for you to release a version to pypi.org containing this patch?
@ecederstrand New version uploaded!
Don't require pytest-runner outside of tests because
setup_requires
behaves poorly in certain situations. For example, see https://github.com/pytest-dev/pytest-runner#conditional-requirement and https://github.com/pypa/pip/issues/410.