[Python-Dev] PEP 250 buglet

Fredrik Lundh fredrik@effbot.org
Wed, 2 May 2001 20:20:24 +0200


PEP 250 suggests changing the sitedirs setup in site.py from

    sitedirs = [prefix]

to

    sitedirs == [makepath(prefix, "lib", "site-packages")]

on windows. it then goes on to say that

    This change does not preclude packages using the current
    location -- the change only adds a directory to sys.path, it
    does not remove anything.

this isn't true (even after correcting the typo), since the
sitedirs list isn't only added to the path; it's also used to
look for PTH files.  after this change, PTH files located under
prefix will no longer be found.

the following change works a bit better:

    sitedirs = [prefix, makepath(prefix, "lib", "site-packages")]

Cheers /F