RE: [Python-Dev] PEP 250 - site-packages on Windows: (Was: [Distu tils] Package DB: strawman PEP)
From: M.-A. Lemburg [mailto:mal@lemburg.com]
I don't have a site-packages dir in my installations. Could it be that you installed some distutils package which automagically created one or that this change in Python 2.1.1 ?
I don't believe so. I have ActiveState Python - it's possible (although unlikely, I would think) that that version creates site-packages specially. It's vaguely possible (although unlikely) that I created the directory manually - it was missing in one of the 2.1 betas, IIRC, but I thought it reappeared in 2.1 final. In any case, the necessary changes to make sure that directory exists should be in the Windows Installer package(s) for Python. I guess that means somewhere in the Wise installer scripts - which I don't have access to, nor would I know how to change. It should just be a case of reinstating the behaviour in 2.0, if the directory really has been lost in 2.1.
This doesn't seem to do the trick: the Windows installer still installs the packages directly to \Python21.
This change should (as I said, it's untested) have ensured that "python setup.py install" puts the module into site-packages. I don't know what the installer code in bdist_wininst.py does, as it's a base64-encoded EXE, and I don't have the sources - surely it uses the distutils sysconfig stuff to get the value (it has no other way of knowing...)? Paul.
From: "Moore, Paul"
From: M.-A. Lemburg [mailto:mal@lemburg.com]
This doesn't seem to do the trick: the Windows installer still installs the packages directly to \Python21.
This change should (as I said, it's untested) have ensured that "python setup.py install" puts the module into site-packages. I don't know what the installer code in bdist_wininst.py does, as it's a base64-encoded EXE, and I don't have the sources - surely it uses the distutils sysconfig stuff to get the value (it has no other way of knowing...)? The sources are in CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/distutils/misc/
The bdist_wininst installer simply installs into prefix, this is what the registry has under HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.1\InstallPath. Now what should it do? There are probably some issues here. Currently it installs the package into prefix, and creates a prefix/Remove<xxx>.exe uninstaller, and *appends* info about uninstallation into the prefix/<xxx>-wininst.log file. In the future (after PEP250) it should install the package into prefix/lib/site-packages. Also for older Python versions? Or only for the newer ones? Depending on the distutils' version used to create the installer? Depending on the actual site.py file? Hardcoding a version check (version >= 2.2') into the installer doesn't seem so nice, but would probably do the correct thing. Note that 'python setup.py install' requires distutils to be present - the bdist_wininst installer does not. Thomas
"Moore, Paul" wrote:
From: M.-A. Lemburg [mailto:mal@lemburg.com]
I don't have a site-packages dir in my installations. Could it be that you installed some distutils package which automagically created one or that this change in Python 2.1.1 ?
I don't believe so. I have ActiveState Python - it's possible (although unlikely, I would think) that that version creates site-packages specially. It's vaguely possible (although unlikely) that I created the directory manually - it was missing in one of the 2.1 betas, IIRC, but I thought it reappeared in 2.1 final. In any case, the necessary changes to make sure that directory exists should be in the Windows Installer package(s) for Python. I guess that means somewhere in the Wise installer scripts - which I don't have access to, nor would I know how to change.
They should be in the CVS tree of Python on SourceForge.
It should just be a case of reinstating the behaviour in 2.0, if the directory really has been lost in 2.1.
This doesn't seem to do the trick: the Windows installer still installs the packages directly to \Python21.
This change should (as I said, it's untested) have ensured that "python setup.py install" puts the module into site-packages.
About the change: I think distutils should lookup the path in Python's site.py file - that way you assure that distutils will work on all Python installations rather than only on those which have the site.py patch. Otherwise, Python won't find the packages installed in Lib/site-packages.
I don't know what the installer code in bdist_wininst.py does, as it's a base64-encoded EXE, and I don't have the sources - surely it uses the distutils sysconfig stuff to get the value (it has no other way of knowing...)?
The sources for the Windows installer are on SourceForge CVS too (under the distutils branch). I believe that Thomas Heller who wrote the installer will know best what to do about this... -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
On Thu, Jul 12, 2001 at 11:02:28AM +0100, Moore, Paul wrote:
From: M.-A. Lemburg [mailto:mal@lemburg.com]
I don't have a site-packages dir in my installations. Could it be that you installed some distutils package which automagically created one or that this change in Python 2.1.1 ?
I don't believe so. I have ActiveState Python - it's possible (although unlikely, I would think) that that version creates site-packages specially.
The ActivePython 2.1 installer *does* create <installdir>\Lib\site-packages on Windows. Trent -- Trent Mick TrentM@ActiveState.com
participants (4)
-
M.-A. Lemburg
-
Moore, Paul
-
Thomas Heller
-
Trent Mick