From: Paul Moore <p.f.moore@gmail.com>
OK, that sounds like a good approach then. It might be worth noting that relative paths are to be preferred wherever sensible (but that's a recommendation only, not a requirement). But as I noted at the start of this thread, it is *not* what PEP 376 states at present. Do we need an update to the PEP if that is to become the "de facto" standard?
PEP 376 states that the path is either absolute, using os.sep, or relative to the "base location", using '/'. The base location is site-packages, or wherever was specified as --install-lib. The example extract from RECORD is also misleading, since the relative paths in there are not relative to site-packages. The location of .dist-info is mentioned as being site-packages, but that didn't exactly jump out, so it could be clearer.
Also, the first question I posed in my initial posting in this thread appears to remain unanswered:
""" 1. The dist-info directory for a distribution is stated as being "located in the site-packages directory".
It's not clear how this is intended to work in a PEP 370 world with multiple site-packages. What I propose is that the description be
Presumably you'd select the one based on the (current user and the) version of the running Python.
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?
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? Regards, Vinay Sajip