Where to python libraries get installed?

Fred Wright fw at fwright.net
Sun Oct 8 00:09:42 UTC 2017


On Sat, 7 Oct 2017, Hal Murray wrote:

> >>> Should it also printout where it will install the python libraries?
> >> Good idea.  I'd take that patch.
>
> > It's already there.  Look at PYTHONDIR towards the end.
>
> Thanks.
>
> Is that used for anything other that storing python libraries?

No, if "storing" includes the code that may clean up old library installs.

> What is PYTHONARCHDIR used for?

The difference is in the value of the 'plat_specific' argument to
get_python_lib().  The intended distinction is between
architecture-independent pure Python code and architecture-dependent
compiled extensions, in case the Python implementation wants to keep them
in different places.  So in theory, PYTHONARCHDIR should be the install
location for the C extension, but doing that doesn't seem to work on
platforms where the two are actually different, so currently PYTHONARCHDIR
is unused.  However, anyone overriding the default(s) should set both
appropriately, in case that gets sorted out in the future.

Fred Wright


More information about the devel mailing list