Resolution of the library-path mess

Fred Wright fw at fwright.net
Fri Oct 6 21:07:52 UTC 2017


On Thu, 5 Oct 2017, Hal Murray wrote:

> >> Warnings are easily lost in the noise.  So either create the
> >> directory or treat it as an error and bail.
>
> > There are two issues with just "creating the directory":
> > 1) There's no guarantee that Python will actually use it.
> > 2) Creating the directory requires root, and it would be
> > undesirable to require that 'configure' run as root.
>
> The actual create can be deferred until the install.

Actually, it can't - see below.

> I don't understand the comment about "actually use it"?  Is that any
> different from the case where the directory did exist?

Yes.  It's about whether the directory in question is one of those that
Python considers for automatic inclusion in its sys.path.  Since Python
filters nonexistent directories out of that setup, looking at sys.path at
configure time can only work if the directory in question already exists
at configure time.  Install time is too late.

The overarching question is:  Why does Python have to make this so damn
difficult?

Fred Wright


More information about the devel mailing list