[Distutils] specify available build commands

Tarek Ziadé ziade.tarek at gmail.com
Tue Aug 12 16:22:13 CEST 2008

On Tue, Aug 12, 2008 at 4:04 PM, chris <cdcasey at gmail.com> wrote:

> Is there a way in distutils / setuptools to list the available build
> commands via porperty or function?

commands usually calls other commands (bdist for instance calls build)

you can get a list of commands with:

$ python setup.py --help-commands

but i don't think you can list the underlying commands. The only
way is to look into the code of each commands.

> Specifically, I want to be able to add a configuration and build some
> classes only if one of these commands is specified.

what are you trying to do precisely ?

> python setup.py build <----- confuguration added
> python setup.py sdist bdist_egg <----- confuguration added

you are building two distributions here, one source (.tar.gz) and one binary
look into your dist/ folder.

> python setup.py sdist <----- confuguration not added
> Maybe there's a better way to do it.

> -Chris
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig

Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080812/253fe969/attachment.htm>

More information about the Distutils-SIG mailing list