On Dec 20, 4:49pm, Guido van Rossum wrote:
I claim that it *is* an issue of disk space. Having the installation of a particular package spread out over two places is inconvenient from a management point of view, and sharing one of those places between different installations (for different platforms) of the same package just makes it a lot worse.
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
[Michael Sanner]
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).
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:
[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). ... Without a shared area, each platform can update without affecting the others.
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!)
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.
Oh, you gen-X'ers thinking you're old... Have you had your prostate checked lately? :-)
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!)
<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:
But what platform-specific directory should packages be installed into?
<exec_prefix>lib/python<version>/site-packages
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.
Guido van Rossum writes:
But what platform-specific directory should packages be installed into?
<exec_prefix>lib/python<version>/site-packages
[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.
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...
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/)