[Distutils] python setup.py develop and extras

PJ Eby pje at telecommunity.com
Wed Nov 28 07:22:37 CET 2012


On Mon, Nov 26, 2012 at 3:10 AM, Chris Withers <chris at simplistix.co.uk>wrote:

>
> On 23/11/2012 22:11, PJ Eby wrote:
>
>> If you're still looking for an answer, pretty much all you can do for
>> that is: "setup.py develop easy_install pkgname[docs,testing]".  You can
>> shorten it by defining an generic alias for "develop easy_install" in
>> your global or user distutils .cfg, or a project-specific alias for
>> "develop easy_install pkgname" in the project's setup.cfg.
>>
>
> This sounds like exactly what I'm after but the way you wrote your reply
> suggests I might be missing something...
> What are the snags with the above? What don't I get that I do with just a
> straight "setup.py develop pkgname"?
>

You have that backwards: it's what you DO get with that, that you *don't*
get with plain develop.  Doing "develop easy_install pkg[extras]" will
first install the package in develop mode, then install it *again*,
hopefully as a no-op due to already being on sys.path, and finally install
the extras.

You could of course do easy_install first, *then* the develop, but that
would require running setup.py twice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20121128/8cb5fe56/attachment.html>


More information about the Distutils-SIG mailing list