[Distutils] Installation directory
Moore, Paul
Paul.Moore@uk.origin-it.com
Tue Oct 24 09:21:01 2000
I haven't been involved with Python for quite a while now, having been doing
work with Perl instead. I was recently prompted to have another look at
Python. (I don't have strong enough views on scripting languages to be
described as a proper convert, though...) I was fairly quickly drawn into a
discussion on 3rd party modules, and on the back of a comment that Python
really needs a repository of packages like Perl's CPAN, I said that what was
really important was that Python had a standardised build and distribution
process, like Perl's MakeMaker and the standard Perl directory structure.
As usual when I make comments like this, I immediately discovered distutils,
which seems almost exactly what I was thinking of... :-) So I printed out
the documentation, downloaded and skimmed the mailing list archive (not had
time to read all 1600 messages yet!) and had a go with it.
So far, I've only played with "pure python" modules, but it looks quite
nice. I do, however, have one problem with it, which may be more a Python
issue than a distutils issue, but I thought I'd raise it here anyway.
I'm working on Win32, with Python 2.0 (the ActiveState distribution,
although I don't believe there is any fundamental difference between this
and the BeOpen distribution). When I package a module, and then unpack it,
it is installed directly into the C:\Applications\Python20 directory, which
is the Python installation directory. This is not what I would want,
especially as the default action.
(Excuse the mention of Perl here...) When Perl is built and installed, it
creates a directory structure under its installation directory, consisting
of a "bin" directory (executables and DLLs), a "lib" directory (library
modules) and a "site" directory (locally installed modules). The "site"
directory is empty by default, but is where all MakeMaker-installed modules
are placed.
I would like it if Python worked similarly. Clearly, there isn't any point
in changing the existing directory structure, but adding a ...\Python20\Site
directory, and having distutils install modules there by default, would help
to separate components of the installation from local additions. I guess
this requires co-operation from the Python core, as it would need
...\Python20\Site adding by default into the sys.path list.
Does this idea make sense? Is it worth doing, or have I missed something
fundamental? (BTW, I have no idea if Python on Unix is set up differently -
maybe this is already in place there...?
Thanks for your time,
Paul Moore.