Lots of little changes made to Phoenix code over the past few months, plus some tweaks to get it running with the current wx.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-08-25 23:45:50 +00:00
parent f330955043
commit 911d90273c
22 changed files with 271 additions and 64 deletions

View File

@@ -47,7 +47,7 @@ class Configuration(object):
SIPFILES = 'sip' # where to find other sip files for %Include or %Import
SIPOUT = 'sip/cpp' # where to put the generated C++ code
SIPOPTS = ' '.join(['-k', # turn on keyword args support
SIPOPTS = ' '.join(['-w', # enable warnings
'-o', # turn on auto-docstrings
#'-e', # turn on exceptions support
'-T', # turn off writing the timestamp to the generated files
@@ -557,4 +557,4 @@ def etg2sip(etgfile):
sipfile = os.path.splitext(os.path.basename(etgfile))[0] + '.sip'
sipfile = posixjoin(cfg.SIPGEN, sipfile)
return sipfile

View File

@@ -151,12 +151,20 @@ from distutils.errors import DistutilsExecError, CompileError
def _darwin_compiler_fixup(compiler_so, cc_args):
"""
This function will strip '-isysroot PATH' and '-arch ARCH' from the
compile flags if the user has specified one them in extra_compile_flags.
compile flags if the user has specified one of them in extra_compile_flags.
This is needed because '-arch ARCH' adds another architecture to the
build, without a way to remove an architecture. Furthermore GCC will
barf if multiple '-isysroot' arguments are present.
I've further modified our copy of this function to check if there
is a -isysroot flag in the CC/CXX values in the environment. If so then we
want to make sure that we keep that one and strip the others, instead of
stripping it and leaving Python's.
"""
ccHasSysroot = '-isysroot' in os.environ.get('CC', '') \
or '-isysroot' in os.environ.get('CXX', '')
stripArch = stripSysroot = 0
compiler_so = list(compiler_so)
@@ -169,7 +177,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
stripArch = stripSysroot = True
else:
stripArch = '-arch' in cc_args
stripSysroot = '-isysroot' in cc_args or stripArch # <== This line changed
stripSysroot = '-isysroot' in cc_args or stripArch
if stripArch:
while 1:
@@ -182,7 +190,10 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
if stripSysroot:
try:
index = compiler_so.index('-isysroot')
index = 0
if ccHasSysroot:
index = compiler_so.index('-isysroot') + 1
index = compiler_so.index('-isysroot', index)
# Strip this argument and the next one:
del compiler_so[index:index+2]
except ValueError: