On Thu, Sep 8, 2016 at 10:23 AM, Philippe Ombredanne <pombreda...@nexb.com> wrote: > On Wed, Sep 7, 2016 at 11:00 PM, vitaly numenta > <vitaly.krugl.nume...@gmail.com> wrote: >> I would like to structure my project such that when I build a wheel for >> deployment to PyPi, the wheel uses the pinned-down versions of dependencies, >> but during development/experimental builds uses the >> abstract/loosely-versioned dependencies. >> >> I want developers to be able to use the abstract dependencies for >> experimenting with my package against other versions of the dependencies, >> but installs of my wheel from PyPi need to reference the concrete >> (pinned-down) dependencies with which my build system actually tested my >> wheel. >> >> Users that install my wheel from PyPi will not (and should not need to) have >> access to my package's requirements.txt. > > Vitaly: > you cannot treat setup.py as a both a flexible set of version ranges > and a pinned set at the same time. > For a detailed explanation please read Donald's post here: > https://caremad.io/2013/07/setup-vs-requirement/ > >> However, when building a wheel, I don't see a way to build one that >> incorporates the pinned-down dependencies from requirements.txt instead of >> the loosely-versioned requirements from `extras_require`. > > The requirements are not used by setup.py and THEY SHOULD NOT, IMHO. > Use requirements for pinned versions, not setup.py.
In particular if based on your email this is some code you are talking about I would never do this: https://github.com/numenta/nupic/blob/d2aad354226bba6b554c706e74e18b3ed4415a0f/setup.py#L84 e.g. I would NEVER source install_requires from a requirements.txt because this would rob my users and flexibility from any flexibility in versions. I find quite unfortunate that there are so many setup.py that do this and so many snippets and SO posts that recommend this. **sigh** This is the source of many problems, like the one you are facing. -- Cordially Philippe Ombredanne _______________________________________________ Wheel-builders mailing list Wheel-builders@python.org https://mail.python.org/mailman/listinfo/wheel-builders