how to add command line flags to distutils setup script?

skip at pobox.com skip at pobox.com
Mon Dec 8 19:59:52 EST 2008


Suppose I have a setup.py script which imports distutils.core.setup.  Is
there some way to, for example, add a command line flag to the build command
so that I can run it like

    python setup.py build --frob=True

?  I see that the setup function takes an options parameter but the
distutils.core.setup doc says little other than that it is a string and
"default options for the setup script".  There is also a script_args
parameter, but the docs are similarly mum about what exactly it's used for.
A posting by Greg Ward announcing it in Aug 2000 says script_args is a sub
for sys.argv[1:].

Pointers to other documentation or tutorials on the topic cheerfully
appreciated.

Thanks,

-- 
Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/



More information about the Python-list mailing list