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

Jeroen Dekkers jeroen at dekkers.ch
Mon Jan 7 14:47:01 CET 2013


At Mon, 31 Dec 2012 18:59:19 +0000 (UTC),
Vinay Sajip wrote:
> 
> Jeroen Dekkers <jeroen <at> dekkers.ch> writes:
> 
> > I agree that having the paths relative to the parent directory of the
> > .dist-info directory is preferable. It's easy to implement and I don't
> > really see any downsides at the moment.
> 
> Perhaps not on POSIX, but on Windows things don't fit nicely in FHS-like schema.
> For example, if you need to install PowerShell scripts, they will not be able
> to be shoe-horned into somewhere under site-packages, as PowerShell looks in
> specific (other) places.

That is also the case for POSIX, where the scripts should be installed
to /usr/bin and the site-packages directory is something like
/usr/lib/python2.7/site-packages. But I forgot that you can't use
relative paths if things are on a different drive with Windows, so I
agree that using only relative paths isn't a good idea.
 
> I agree that PEP 376 isn't ideal in what it specifies in this area. The simplest
> solution would surely be absolute paths only. What are the downsides apart from
> the disk space used for the extra lengths of the filenames?

I can see the merits of using relative paths in some use cases, but I
also see the problems of using them in other cases. Maybe we should
just allow both.

We can specify that paths in RECORDS can be relative to the parent
directory of the .dist-info directory or absolute and both must be
supported by installation tools. Whether relative or absolute paths
are used is decided by the tool that creates/modifies the RECORDS
file.

That seems easy enough to implement, while flexible enough to support
the different use cases.

Kind regards,

Jeroen Dekkers


More information about the Distutils-SIG mailing list