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

Paul Moore p.f.moore at gmail.com
Mon Jan 7 19:06:38 CET 2013


On 7 January 2013 16:37, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
>> changed to be worded in terms of sysconfig-style locations: the
>> dist-info directory is located in whichever of purelib or platlib is
>> used by the distribution. When the distribution uses both, purelib is
>> preferred, when it uses neither (!) purelib is used. In nearly all
>
> What kind of distributions would use neither purelib nor platlib?

I'm not aware of any, and I think it would be pretty bizarre - that
was the point of the "(!)". I only mentioned it for completeness.

>> cases, this is the same as currently. The exceptions are posix_home
>> (where the directory name isn't "site-packages" but its function
>> is
>> the same), posix_prefix (where purelib and platlib differ, and PEP 376
>> is currently ambiguous as to which is implied), and any custom schemes
>> that might be created (where PEP 376 is silent, and this proposal has
>> the benefit of at least being specific). I do not believe this changes
>> any actual practice - as far as I have been able to determine any code
>> using dist-info at the moment follows this proposal in the corner
>> cases where it differs from PEP 376.
>> """
>
> On what basis would you pick anything other than purelib to install your distribution into? Just that your distribution contains C extensions, or other additional criteria?

I believe "it uses C extensions" is the criterion, but it's something
that is decided internally by distutils, as far as I am aware, and I
have never braved the code to determine the exact rules. As a package
consumer, and in particular one working on a platform where
purelib=platlib, I only care insofar as I want a well-defined rule
that doesn't break regardless of which is used, and can be accepted by
people who work in environments where it *does* matter.

Paul.


More information about the Distutils-SIG mailing list