
On Mon, Jul 9, 2012 at 1:27 PM, Daniel Holth dholth@gmail.com wrote:
Though in the interest of not having too many different ways to do a similar thing, could this not also be used for tests/docs? Perhaps even "Provides-Extra: tests", and "Provides-Extra: docs" should be reserved names as you suggested. I envision something like:
...
Provides-Extra: setup Requires-Dist: mysetuphooks; extra == 'setup'
for build-time dependencies. Although in that case, pysetup (or any other installer) would explicitly have to check for this in the metadata before doing anything else. So maybe this example stretches this syntax too far? Plus build-time dependencies are not exactly "extras". It's very much required to do anything with the package.
Pre-built or binary packages won't want to install the build-time dependencies. The check for a particular Provides-Extra is trivial, just a list membership test.
I expect to see a lot of bugs in packages that require some of their build-time dependencies at run time.
Maybe, but wouldn't that be the developer's problem? setup_requires has the same issue--it does not install the setup requirements into site-packages. Instead it just does an egg install into the source directory and activates it on the path. Outside of future setup.py runs, the setup_requires distributions are not available (you would have to add them to install_requires too if you need them at runtime).
Under a scheme like this one would have to list that dependency under Requires-Dist twice: with and without the 'extra' marker. I might still prefer extending the metadata format to add a Setup-Requires-Dist or the like.
Erik