setuptools setup.py and "extras"

Chadrik chadrik at gmail.com
Wed Apr 22 04:19:34 EDT 2009


in addition to resolving install dependencies, setuptools supports
"extras" with their own dependencies.   these can be installed using
easy_install, like so:

$ easy_install mypackage[extraFeature]

what is the best way to cause an extra's dependencies to be installed
when using the `python setup.py` form?


i discovered that you can use easy_install via setup.py and point it
at the current directory:

$ python setup.py easy_install .  #<--- the period points easy_install
at our current dir


however, this does not install the extra features.  trying the next
logical step doesn't work:

$ python setup.py easy_install .[extraFeature]


so far the best that i've found is :

$ cd /path/to/mypackage
$ cd ..
$ python mypackage/setup.py easy_install mypackage[extraFeature]

is there a simpler way?

-chad





More information about the Python-list mailing list