summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:41:03 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:41:03 (GMT)
commitedacea30e457e151611a9fe560120cedb3bdc527 (patch)
tree3227e5e1c060cce48b00d34b9ae46571f079e2fb /Lib/distutils/unixccompiler.py
parent82b83985832a0b1922aa86261f764b12a7237ac5 (diff)
downloadcpython-edacea30e457e151611a9fe560120cedb3bdc527.zip
cpython-edacea30e457e151611a9fe560120cedb3bdc527.tar.gz
cpython-edacea30e457e151611a9fe560120cedb3bdc527.tar.bz2
Merged revisions 77704,77752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line taking sysconfig out of distutils ........ r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line switched the call order so this call works without suffering from issue #7774 ........
Diffstat (limited to 'Lib/distutils/unixccompiler.py')
-rw-r--r--Lib/distutils/unixccompiler.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 51f6349..c14a5d3 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -17,7 +17,6 @@ __revision__ = "$Id$"
import os, sys
-from distutils import sysconfig
from distutils.dep_util import newer
from distutils.ccompiler import \
CCompiler, gen_preprocess_options, gen_lib_options
@@ -25,6 +24,7 @@ from distutils.errors import \
DistutilsExecError, CompileError, LibError, LinkError
from distutils import log
+
# XXX Things not currently handled:
# * optimization/debug/warning flags; we just use whatever's in Python's
# Makefile and live with it. Is this adequate? If not, we might
@@ -74,7 +74,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
if 'ARCHFLAGS' in os.environ and not stripArch:
# User specified different -arch flags in the environ,
- # see also distutils.sysconfig
+ # see also the sysconfig
compiler_so = compiler_so + os.environ['ARCHFLAGS'].split()
if stripSysroot:
@@ -281,7 +281,9 @@ class UnixCCompiler(CCompiler):
# this time, there's no way to determine this information from
# the configuration data stored in the Python installation, so
# we use this hack.
- compiler = os.path.basename(sysconfig.get_config_var("CC"))
+ _sysconfig = __import__('sysconfig')
+
+ compiler = os.path.basename(_sysconfig.get_config_var("CC"))
if sys.platform[:6] == "darwin":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
@@ -296,7 +298,7 @@ class UnixCCompiler(CCompiler):
# use it anyway. Since distutils has always passed in
# -Wl whenever gcc was used in the past it is probably
# safest to keep doing so.
- if sysconfig.get_config_var("GNULD") == "yes":
+ if _sysconfig.get_config_var("GNULD") == "yes":
# GNU ld needs an extra option to get a RUNPATH
# instead of just an RPATH.
return "-Wl,--enable-new-dtags,-R" + dir