[Python-checkins] python/dist/src/Lib/distutils sysconfig.py, 1.62,
1.63
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Thu Mar 3 12:08:05 CET 2005
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8831/Lib/distutils
Modified Files:
sysconfig.py
Log Message:
Patch #1046831: Use get_python_version where appropriate in sysconfig.py.
Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- sysconfig.py 26 Dec 2004 23:07:48 -0000 1.62
+++ sysconfig.py 3 Mar 2005 11:08:02 -0000 1.63
@@ -34,7 +34,7 @@
del argv0_path, landmark
-def get_python_version ():
+def get_python_version():
"""Return a string containing the major and minor Python version,
leaving off the patchlevel. Sample return values could be '1.5'
or '2.2'.
@@ -65,7 +65,7 @@
if not os.path.exists(inc_dir):
inc_dir = os.path.join(os.path.dirname(base), "Include")
return inc_dir
- return os.path.join(prefix, "include", "python" + sys.version[:3])
+ return os.path.join(prefix, "include", "python" + get_python_version())
elif os.name == "nt":
return os.path.join(prefix, "include")
elif os.name == "mac":
@@ -110,7 +110,7 @@
if standard_lib:
return os.path.join(prefix, "Lib")
else:
- if sys.version < "2.2":
+ if get_python_version() < "2.2":
return prefix
else:
return os.path.join(PREFIX, "Lib", "site-packages")
@@ -189,7 +189,7 @@
inc_dir = os.curdir
else:
inc_dir = get_python_inc(plat_specific=1)
- if sys.version < '2.2':
+ if get_python_version() < '2.2':
config_h = 'config.h'
else:
# The name of the config.h file changed in 2.2
@@ -378,7 +378,7 @@
if python_build:
g['LDSHARED'] = g['BLDSHARED']
- elif sys.version < '2.1':
+ elif get_python_version() < '2.1':
# The following two branches are for 1.5.2 compatibility.
if sys.platform == 'aix4': # what about AIX 3.x ?
# Linker script is in the config directory, not in Modules as the
@@ -405,7 +405,7 @@
# it's taken care of for them by the 'build_ext.get_libraries()'
# method.)
g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
- (linkerscript, PREFIX, sys.version[0:3]))
+ (linkerscript, PREFIX, get_python_version()))
global _config_vars
_config_vars = g
More information about the Python-checkins
mailing list