[Distutils] fwd: Distutils.sysconfig.get_python_lib() always
returns absolute path in win32.
M.-A. Lemburg
mal@lemburg.com
Tue Nov 26 04:29:39 2002
Andrew Kuchling wrote:
> De-HTMLifying...
> ...
>
> I browsed the bug and patch managers and didn't see any patches or
> bug reports matching what I believe to be a bug in the
> get_python_lib() function in the distutils sysconfig.py file in the
> win32 version of Python 2.2.2. When os.name == "nt" and sys.version
> > 2.2, get_python_lib() always returns the absolute path when the
> plat_specific argument is true. Maybe I'm showing my ignorance but
> I'm guessing that get_python_lib(1,0,'') should return the relative
> path as it does for all the other cases.
I suppose this is for Thomas Heller to answer. Perhaps the
bdist_wininst command relies on this.
Why is it relevant whether get_python_lib() returns a
relative or an absolute path ?
> ...
>
> *** sysconfig.py~ Tue Oct 8 19:46:04 2002
> --- sysconfig.py Mon Nov 25 11:05:02 2002
> ***************
> *** 110,116 ****
> if sys.version < "2.2":
> return prefix
> else:
> ! return os.path.join(PREFIX, "Lib", "site-packages")
>
> elif os.name == "mac":
> if plat_specific:
> --- 110,116 ----
> if sys.version < "2.2":
> return prefix
> else:
> ! return os.path.join(prefix, "Lib", "site-packages")
>
> elif os.name == "mac":
> if plat_specific:
>
> At the start of this function, there are the lines:
>
> if prefix is None:
> prefix = plat_specific and EXEC_PREFIX or PREFIX
>
> So using PREFIX certainly looks incorrect; 'prefix' uses EXEC_PREFIX
> or PREFIX as appropriate. Can someone on NT please verify?
>
> Just after the branch for os.name == "mac", the OS/2 code
> also uses PREFIX:
>
> elif os.name == "os2":
> if standard_lib:
> return os.path.join(PREFIX, "Lib")
> else:
> return os.path.join(PREFIX, "Lib", "site-packages")
>
> Should this be fixed, too?
>
> --amk (www.amk.ca)
> Abstraction is one of those notions that Python tosses out the window, yet
> expresses very well.
> -- Gordon McMillan, 6 Jan 2000
>
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG@python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/