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

Brian Curtin brian at python.org
Tue Mar 13 21:11:43 CET 2012


On Tue, Mar 13, 2012 at 14:43, VanL <van.lindberg at gmail.com> wrote:
> Following up on conversations at PyCon, I want to bring up one of my
> personal hobby horses for change in 3.3: Fix install layout on Windows, with
> a side order of making the PATH work better.
>
> Short version:
>
> 1) The layout for the python root directory for all platforms should be as
> follows:
>
> stdlib = {base/userbase}/lib/python{py_version_short}
> platstdlib = {base/userbase}/lib/python{py_version_short}
> purelib = {base/userbase}/lib/python{py_version_short}/site-packages
> platlib = {base/userbase}/lib/python{py_version_short}/site-packages
> include = {base/userbase}/include/python{py_version_short}
> scripts = {base/userbase}/bin
> data = {base/userbase}

I'm familiar with the scripts/bin change. I take it the rest of that
stuff matches *nix? Text later on seems to support this, so I think
I'm on board with it.

> 2) On Windows, the python executable (python.exe) will be in the "bin"
> directory. That way the installer can optionally add just that directory to
> the PATH to pick up all python-related executables (like pip, easy_install,
> etc).

I'm updating my installer patch to do exactly this. After talking with
Dino from Microsoft's Python Tools team, we're also going to add an
additional registry key for them to find that bin/ path.

> I have talked with a number of people at PyCon, including Tarek and MvL.
> Nobody objected, and several thought it was a good idea.

Martin and I spoke on Friday and at least the bin/ folder and Path
stuff are acceptable and I'm working on the code for those.

> To add just a little more complication, the python binary is placed within
> the binaries directory when a virtualenv is created, leading to an
> inconsistency between regular python installs and virtualenvs.

If that virtualenv PEP is also accepted for 3.3, I think we can take
care of inconsistencies there (at least moving forward).


More information about the Python-Dev mailing list