On Fri, Jul 6, 2012 at 11:20 AM, Daniel Holth <dho...@gmail.com> wrote:
> It is exactly the same as setuptools' "extras" feature, and I didn't
> quote the entire edit on-list. Also, there is a reference
> implementation at https://bitbucket.org/dholth/distribute/ in the
> DistInfoDistribution class.
>
> The 'test' and 'doc' reserved names are not an essential part of the
> Provides-Extra feature. Provides-Extra: is primarily for optional
> run-time (not build-time) dependencies.

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: tests
Requires-Dist: nose; extra == 'tests'
Provides-Extra: docs
Requires-Dist: sphinx; extra == 'docs'


$ pysetup test
Tests require the 'nose' package. Please run `pysetup install
mypackage[tests]` to install the test dependencies.

Ditto for building the docs.  In a sense, being able to run the tests,
or build the docs could be considered 'extra' features.  One could
even have:

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.

Erik
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to