[Distutils] setup.py command-line syntax

Martijn Faassen M.Faassen@vet.uu.nl
Tue, 19 Jan 1999 16:42:42 +0100

[another arg..I sent this off to Greg Ward alone instead of to the
mailing list. Here it is for everybody else :)]

Greg Ward wrote:
[a whole slew of options on command line options] 
> Anyone have any other schemes?  Comments on these?  Preferences?

What about combining it with a options(.py?) file?

setup.py would simply implement a number of major options, like:

# install everything (default: standard dirs) (build if necessary?)
setup install
# build everything (default: for this platform)
setup build
# build docs
setup build_docs
# install docs
setup install_docs

This would do everything in the default way. Especially installation
(for which distutils will be used a lot anyway) will benefit from this,
as it's simple. No need for most people to even think about options.

Then we have a simple options file, text, or perhaps better python,
copiously commented:

# build what kind of docs
docs_output = ['html', 'txt']

# install Python files to this directory
install_dir = '/usr/local/lib/python1.5'

The idea of an options file is:

* It has comments. You don't need to remember a whole slew of command
line options or read through an INSTALL document to see what command
line options there are in the first place.

* You can have a site default options file (in combo with a package
specific options file?). That way you don't have to command line option
each package if you want to install it to a 'strange' directory, or

* Perhaps it's also easier to understand for non Unix Pythoneers, who
aren't used to command line options.