[Distutils] Two fixes (at last)

Greg Ward gward@cnri.reston.va.us
Mon, 7 Jun 1999 22:14:22 -0400

Hi all --

at long last, I have fixed two problems that a couple people noticed a
while ago:

  * I folded in Amos Latteier's NT patches almost verbatim -- just
    changed an `os.path.sep == "/"' to `os.name == "posix"' and added
    some comments bitching about the inadequacy of the current library
    installation model (I think this is Python's fault, but for now
    Distutils is slavishly aping the situation in Python 1.5.x)

  * I fixed the problem whereby running "setup.py install" without
    doing anything else caused a crash (because 'build' hadn't yet
    been run).  Now, the 'install' command automatically runs 'build'
    before doing anything; to make this bearable, I added a 'have_run'
    dictionary to the Distribution class to keep track of which commands
    have been run.  So now not only are command classes singletons,
    but their 'run' method can only be invoked once -- both restrictions
    enforced by Distribution.

The code is checked into CVS, or you can download a snapshot at


Hope someone (Amos?) can try the new version under NT.  Any takers for
Mac OS?

BTW, all parties involved in the Great "Where Do We Install Stuff?"
Debate should take a good, hard look at the 'set_final_options()' method
of the Install class in distutils/install.py; this is where all the
policy decisions about where to install files are made.  Currently it
apes the Python 1.5 situation as closely as I could figure it out.
Obviously, this is subject to change -- I just don't know to *what* it
will change!


Greg Ward - software developer                    gward@cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                           voice: +1-703-620-8990
Reston, Virginia, USA  20191-5434                    fax: +1-703-620-0913