Re: [Distutils] Disposition of C extensions and packages

On Dec 20, 4:49pm, Guido van Rossum wrote:
What management are you talking about here ?? It seems to me that duplicate copies of identical files (one copy per platform) is inconvenient (at least for my perspective). Moreover, why provide an prefix and an exec_prefix if we are going to put everything into the same tree anyway ?? -Michel -- -----------------------------------------------------------------------
>>>> AREA CODE CHANGE <<<<<<<<< we are now 858 !!!!!!!
Michel F. Sanner Ph.D. The Scripps Research Institute Assistant Professor Department of Molecular Biology 10550 North Torrey Pines Road Tel. (858) 784-2341 La Jolla, CA 92037 Fax. (858) 784-2860 sanner@scripps.edu http://www.scripps.edu/sanner -----------------------------------------------------------------------

[Michael Sanner]
Suppose a new version of a package is released for platform X but not yet for platform Y (maybe platform Y is less popular and the only maintainer is on vacation). Further suppose the platform-independent files are changed in the new version. Now if you install it in the shared area for platform X, you screw platform Y's installation. Without a shared area, each platform can update without affecting the others.
Moreover, why provide an prefix and an exec_prefix if we are going to put everything into the same tree anyway ??
They are old features; 5 years ago this was worth it to save 0.5 Mb of disk space. --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum writes:
Good argument, and I think I'm convinced by this point; even though duplicating the .py files goes against my grain, that's probably just a sign of my age. But what platform-specific directory should packages be installed into? Is <prefix>/plat-<sys.platform> the right place? Or do we need site-packages/plat-<sys.platform>? (Yet Another default directory added to sys.path -- yuck!) -- A.M. Kuchling http://starship.python.net/crew/amk/ Tabs are good, spaces are bad and mixing the two just means that your motives are confused and that you don't use enough functions. -- John J. Lehmann, 19 Mar 1998

Oh, you gen-X'ers thinking you're old... Have you had your prostate checked lately? :-)
<exec_prefix>lib/python<version>/site-packages This is supported by site.py: """ This will append site-specific paths to to the module search path. On Unix, it starts with sys.prefix and sys.exec_prefix (if different) and appends lib/python<version>/site-packages as well as lib/site-python. On other platforms (mainly Mac and Windows), it uses just sys.prefix (and sys.exec_prefix, if different, but this is unlikely). The resulting directories, if they exist, are appended to sys.path, and also inspected for path configuration files. """ (Note that lib/site-python is obsolete!) --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum writes:
Ah, so then you should never attempt to share site-packages between different Python installations. If you want a directory of common Python code that's used by several different Python binaries, I guess you should hack sitecustomize.py to modify sys.path accordingly. One for GPW's notes on administering a Python installation... I think this argues for changes in the Distutils -- right now an installation like this is really hard. -- A.M. Kuchling http://starship.python.net/crew/amk/ Difficulties are meant to rouse, not discourage. -- William Ellery Channing

[AMK]
Ah, so then you should never attempt to share site-packages between different Python installations.
Not sure. There are TWO site-packages directories. One under prefix, one under exec_prefix. (Of course, if you're not concerned with exec_prefix, they will be the same one.) The one under prefix can be shared -- and should not contain shared libraries if it is shared. The one under exec_prefix is not shared.
Yes, they will (presumably) have different prefix values, and then by default they won't share anything.
I think this argues for changes in the Distutils -- right now an installation like this is really hard.
Not sure what you mean by "like this." --Guido van Rossum (home page: http://www.python.org/~guido/)

[Michael Sanner]
Suppose a new version of a package is released for platform X but not yet for platform Y (maybe platform Y is less popular and the only maintainer is on vacation). Further suppose the platform-independent files are changed in the new version. Now if you install it in the shared area for platform X, you screw platform Y's installation. Without a shared area, each platform can update without affecting the others.
Moreover, why provide an prefix and an exec_prefix if we are going to put everything into the same tree anyway ??
They are old features; 5 years ago this was worth it to save 0.5 Mb of disk space. --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum writes:
Good argument, and I think I'm convinced by this point; even though duplicating the .py files goes against my grain, that's probably just a sign of my age. But what platform-specific directory should packages be installed into? Is <prefix>/plat-<sys.platform> the right place? Or do we need site-packages/plat-<sys.platform>? (Yet Another default directory added to sys.path -- yuck!) -- A.M. Kuchling http://starship.python.net/crew/amk/ Tabs are good, spaces are bad and mixing the two just means that your motives are confused and that you don't use enough functions. -- John J. Lehmann, 19 Mar 1998

Oh, you gen-X'ers thinking you're old... Have you had your prostate checked lately? :-)
<exec_prefix>lib/python<version>/site-packages This is supported by site.py: """ This will append site-specific paths to to the module search path. On Unix, it starts with sys.prefix and sys.exec_prefix (if different) and appends lib/python<version>/site-packages as well as lib/site-python. On other platforms (mainly Mac and Windows), it uses just sys.prefix (and sys.exec_prefix, if different, but this is unlikely). The resulting directories, if they exist, are appended to sys.path, and also inspected for path configuration files. """ (Note that lib/site-python is obsolete!) --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum writes:
Ah, so then you should never attempt to share site-packages between different Python installations. If you want a directory of common Python code that's used by several different Python binaries, I guess you should hack sitecustomize.py to modify sys.path accordingly. One for GPW's notes on administering a Python installation... I think this argues for changes in the Distutils -- right now an installation like this is really hard. -- A.M. Kuchling http://starship.python.net/crew/amk/ Difficulties are meant to rouse, not discourage. -- William Ellery Channing

[AMK]
Ah, so then you should never attempt to share site-packages between different Python installations.
Not sure. There are TWO site-packages directories. One under prefix, one under exec_prefix. (Of course, if you're not concerned with exec_prefix, they will be the same one.) The one under prefix can be shared -- and should not contain shared libraries if it is shared. The one under exec_prefix is not shared.
Yes, they will (presumably) have different prefix values, and then by default they won't share anything.
I think this argues for changes in the Distutils -- right now an installation like this is really hard.
Not sure what you mean by "like this." --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (3)
-
Andrew M. Kuchling
-
Guido van Rossum
-
Michel Sanner