[Python-checkins] CVS: python/dist/src/Lib/distutils sysconfig.py,1.39,1.40
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 02 Aug 2001 13:03:14 -0700
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv11236
Modified Files:
sysconfig.py
Log Message:
Miscellaneous minor cleanups.
Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** sysconfig.py 2001/07/26 18:06:58 1.39
--- sysconfig.py 2001/08/02 20:03:12 1.40
***************
*** 30,41 ****
def set_python_build():
! """Set the python_build flag to true; this means that we're
! building Python itself. Only called from the setup.py script
! shipped with Python.
"""
-
global python_build
python_build = 1
def get_python_inc(plat_specific=0, prefix=None):
"""Return the directory containing installed Python header files.
--- 30,42 ----
def set_python_build():
! """Set the python_build flag to true.
!
! This means that we're building Python itself. Only called from
! the setup.py script shipped with Python.
"""
global python_build
python_build = 1
+
def get_python_inc(plat_specific=0, prefix=None):
"""Return the directory containing installed Python header files.
***************
*** 56,60 ****
return os.path.join(prefix, "include", "python" + sys.version[:3])
elif os.name == "nt":
! return os.path.join(prefix, "Include") # include or Include?
elif os.name == "mac":
return os.path.join(prefix, "Include")
--- 57,61 ----
return os.path.join(prefix, "include", "python" + sys.version[:3])
elif os.name == "nt":
! return os.path.join(prefix, "include")
elif os.name == "mac":
return os.path.join(prefix, "Include")
***************
*** 81,85 ****
if prefix is None:
prefix = plat_specific and EXEC_PREFIX or PREFIX
!
if os.name == "posix":
libpython = os.path.join(prefix,
--- 82,86 ----
if prefix is None:
prefix = plat_specific and EXEC_PREFIX or PREFIX
!
if os.name == "posix":
libpython = os.path.join(prefix,
***************
*** 92,96 ****
elif os.name == "nt":
if standard_lib:
! return os.path.join(PREFIX, "Lib")
else:
return prefix
--- 93,97 ----
elif os.name == "nt":
if standard_lib:
! return os.path.join(prefix, "Lib")
else:
return prefix
***************
*** 99,103 ****
if plat_specific:
if standard_lib:
! return os.path.join(EXEC_PREFIX, "Mac", "Plugins")
else:
raise DistutilsPlatformError(
--- 100,104 ----
if plat_specific:
if standard_lib:
! return os.path.join(prefix, "Mac", "Plugins")
else:
raise DistutilsPlatformError(
***************
*** 105,109 ****
else:
if standard_lib:
! return os.path.join(PREFIX, "Lib")
else:
raise DistutilsPlatformError(
--- 106,110 ----
else:
if standard_lib:
! return os.path.join(prefix, "Lib")
else:
raise DistutilsPlatformError(
***************
*** 114,124 ****
"on platform '%s'" % os.name)
- # get_python_lib()
-
def customize_compiler(compiler):
! """Do any platform-specific customization of the CCompiler instance
! 'compiler'. Mainly needed on Unix, so we can plug in the information
! that varies across Unices and is stored in Python's Makefile.
"""
if compiler.compiler_type == "unix":
--- 115,124 ----
"on platform '%s'" % os.name)
def customize_compiler(compiler):
! """Do any platform-specific customization of a CCompiler instance.
!
! Mainly needed on Unix, so we can plug in the information that
! varies across Unices and is stored in Python's Makefile.
"""
if compiler.compiler_type == "unix":
***************
*** 139,144 ****
def get_config_h_filename():
"""Return full pathname of installed pyconfig.h file."""
! if python_build: inc_dir = '.'
! else: inc_dir = get_python_inc(plat_specific=1)
if sys.version < '2.2':
config_h = 'config.h'
--- 139,146 ----
def get_config_h_filename():
"""Return full pathname of installed pyconfig.h file."""
! if python_build:
! inc_dir = os.curdir
! else:
! inc_dir = get_python_inc(plat_specific=1)
if sys.version < '2.2':
config_h = 'config.h'
***************
*** 198,202 ****
optional dictionary is passed in as the second argument, it is
used instead of a new dictionary.
-
"""
from distutils.text_file import TextFile
--- 200,203 ----
***************
*** 310,315 ****
raise DistutilsPlatformError(my_msg)
!
!
# On AIX, there are wrong paths to the linker scripts in the Makefile
# -- these paths are relative to the Python source, but when installed
--- 311,316 ----
raise DistutilsPlatformError(my_msg)
!
!
# On AIX, there are wrong paths to the linker scripts in the Makefile
# -- these paths are relative to the Python source, but when installed
***************
*** 398,402 ****
"""Return the value of a single variable using the dictionary
returned by 'get_config_vars()'. Equivalent to
! get_config_vars().get(name)
"""
return get_config_vars().get(name)
--- 399,403 ----
"""Return the value of a single variable using the dictionary
returned by 'get_config_vars()'. Equivalent to
! get_config_vars().get(name)
"""
return get_config_vars().get(name)