[Distutils] Re: suggestion

Bastian Kleineidam calvin@cs.uni-sb.de
Mon, 13 Mar 2000 14:05:08 +0100 (CET)


Hi, some further additions from me:
:) > So there are two restrictions for options:
:) > 1) An option is allowed only once and 
:) > 2) an option value type has to be a string.
:) > Both restrictions are not necessary. What I want to have is that if I 
:) > supply mulitple --libs options, each option value gets added to a list.
I discovered the Command.finalize_options() function. There is implemented
a way to supply a list of values, separated by os.pathsep.
        if type (self.include_dirs) is StringType:
            self.include_dirs = string.split (self.include_dirs,
                                              os.pathsep)

So you could type
"python setup.py build_ext -I/usr/include:/usr/local/include"
Well, its not beautiful (espacially because os.pathsep has different
values on different platforms), but it works.

:) If you're interested in hacking on this, be my guest: sounds like a
:) useful addition.  But please do it on the current CVS tree!
I try to get distutils to work for my project. With the above
os.pathsep thingy, the extension of the fancy_getopt module is not the
most important thing for me right now.

What I need more and try to implement are "clean" and 
"uninstall" commands. The clean command was discussed before as I see from
the mailing list archives. The most easy way seems to be to "rm -rf" the
build/ directory.
The "uninstall" command is a bit more difficult. The Perl guys (and
girls) seem to write an uninstall script for each install command.

If you have any ideas to these two commands, let me know them.

Bastian Kleineidam