[Distutils] Some clarifications and/or corrections to PEP 376

Chris McDonough chrism at plope.com
Fri Jan 4 10:37:51 CET 2013

On Fri, 2013-01-04 at 09:17 +0000, Vinay Sajip wrote:
> > From: PJ Eby <pje at telecommunity.com>
> > FWIW, the original reason I argued for relative paths in PEP 376 is
> > supporting installations that are shared across architectures for
> > cross-platform development.  At OSAF, it was common to have a single
> > installation directory shared by a Linux, Mac, *and* Windows machine
> > simultaneously.  Absolute paths would break in such a scenario, as
> > each accessing machine would see a different absolute path.  Some of
> > setuptools' design is specifically mangled to handle this kind of
> > thing.
> Is this a mainstream use case, though? I'm not dead set against relative paths, but looking for simplicity if possible. Nowadays the thinking seems to be around using isolated environments even on a single platform, rather than trying to share across projects. After all, disk space is cheap. The other thing is that using *only* relative paths doesn't cut it - there are circumstances where you write files outside site-packages, so you would need absolute paths for those files (or incredibly convoluted relative ones), and that wouldn't work well in the OSAF scenario you described, anyway.

I've never really understood the idea that mere installation of a
distribution should need to write to completely arbitrary locations on
the filesystem.  Personally, if the software in my distribution needs
things to be put in places that aren't circumscribed by the install
machinery (console scripts are an example of things that *are*
circumscribed by the install machinery) I'll ship the distribution with
a script (often a console script) that people can run that does the
needful, but this never runs during installation.

- C

More information about the Distutils-SIG mailing list