[Distutils] How can I create prebuilt distributions?
Jack Jansen
Jack.Jansen@oratrix.com
Fri Feb 14 16:16:54 2003
On vrijdag, feb 14, 2003, at 18:00 Europe/Amsterdam, David Ascher wrote:
> M.-A. Lemburg wrote:
>
>> This is basically what ActiveState does with their .ppm format:
>> they ship a tarred build directory and then run something like
>> "python setup.py install" on the target machine.
>
> Right. There were quite a few problems with that -- many of the
> setup.py's for example could only work with the full source
> distribution, etc. etc.
I've already given up on the idea, mainly for this reason. Plus, I want
a solution that doesn't need modification of the setup.py script. For
the immediate future I'm sticking with bdist-dumb distributions, and on
the receiving system I can do one of three things:
1. Just unpack it and hope for the best:-)
2. Check the common prefix of the files in the distro (unfortunately
filenames seem to have both ./usr/local/... and usr/local form) and
check that that matches sys.prefix.
3. In the distribution database record the prefix used to create the
archive, and when unpacking the files substitute sys.prefix for
recorded prefix.
At the moment I do (1), but I plan to switch to 2 or 3 shortly
(hopefully before 2.3a2).
It would be nice if at some point in the future the two phases of
distutils (build and install) could be cleanly separated. The files are
mostly separated (although I think that things like scripts and
datafiles don't go via the build subtree, but are installed straight
from the source, right?), but there should be a way in which distutils
could skip the build steps. Although some stuff from the build may need
to be executed, I've seen setup scripts where install actually looks
inside the build object to obtain data...
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -