[Distutils] Re: [Python-Dev] PEP 250: Summary of comments

Thomas Heller thomas.heller@ion-tof.com
Wed Jul 18 13:51:00 2001


From: "Moore, Paul" <Paul.Moore@atosorigin.com>
> This is getting silly. I feel that the correct approach is to go back to my
> original stance, of *only* changing Windows behaviour - leave the Unix and
> Mac camps as they are.

This seems the way to go.

>  With that in mind, sys.extinstallpath seems like an
> overgeneralisation, and the attached patch does everything bar handle
> bdist_wininst.
There is one problem in the diffs below for distutils\sysconfig:
Your patch changes the result of get_python_lib() for standard_lib,
while it should change the directory for site-specific modules.
Correct (IMO) would be (maybe you created this in hurry):

    elif os.name == "nt":
        if standard_lib:
            return os.path.join(PREFIX, "Lib")
        else:
            return os.path.join(prefix, "Lib", "site-packages")


>  The Windows Installer should then do the same thing - load
> Python, and generate os.path.join(sys.prefix, "lib", "site-packages") as the
> destination directory.
No, it should load Python, and use the result of
distutils.sysconfig.get_python_lib() as theinstallation directory.
If this fails, revert to the previous behaviour.

This way would ensure the desired behaviour,
without a need to introduce sys.extinstallpath.

Maybe the PEP should eventually be updated if everyone agrees on this?

Thomas