[Python-Dev] Python install layout and the PATH on win32

Paul Moore p.f.moore at gmail.com
Fri Mar 16 09:38:18 CET 2012


On 16 March 2012 00:12, Carl Meyer <carl at oddbird.net> wrote:
> Changing the directory name is in fact a new and different (and much
> more invasive) special case, because distutils et al install scripts
> there, and that directory name is part of the distutils install scheme.
> Installers don't care where the Python binary is located, so moving it
> in with the other scripts has very little impact.

Two thoughts:

1. The incompatibilities between platforms is precisely the problem
that sysconfig is designed to solve, isn't it? So tools in Python will
either use sysconfig (and be correct regardless of layout) or should
be encouraged to change to use sysconfig (so they are
layout-independent). And tools *not* in Python will be
platform-specific anyway (I assume no-one is writing Perl scripts to
manipulate their Python installation :-))

2. The differences in layout between a installed Python, uninstalled
builds and virtualenvs, on the same platform, are more annoying in
practice than any cross-platform differences (at least for me). But
again, these are known issues that can be dealt with easily enough
(trivially via sysconfig from within Python).

If I were "tidying up", I would consider renaming Scripts to "bin" on
Windows, and putting the Python executables in there (so there's only
one directory to add to PATH, and it uses the common name "bin" rather
than a name that implies that it doesn't contain exes). But that
offers no practical benefit, and as Mark says does break existing
code, so I don't think it's worth it.

If you can get Guido to lend you the time machine keys, I'd support
putting it in from Python 1.5 onwards :-)

Paul.


More information about the Python-Dev mailing list