first two patches: http://trac.wxwidgets.org/ticket/15462 the rest is to make gtk work and for proper handling of arch & sdk flags --- config.py.orig +++ config.py @@ -722,6 +722,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysroot' arguments are present. """ + from distutils import log stripArch = stripSysroot = 0 compiler_so = list(compiler_so) @@ -765,9 +766,9 @@ def _darwin_compiler_fixup(compiler_so, cc_args): sysroot = compiler_so[idx+1] if sysroot and not os.path.isdir(sysroot): - log.warn("Compiling with an SDK that doesn't seem to exist: %s", + log.warning("Compiling with an SDK that doesn't seem to exist: %s", sysroot) - log.warn("Please check your Xcode installation") + log.warning("Please check your Xcode installation") return compiler_so @@ -1024,27 +1025,16 @@ elif os.name == 'posix' or COMPILER == 'mingw32': WXRELEASE = os.popen(WX_CONFIG + ' --release').read()[:-1] WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1] - - if sys.platform[:6] == "darwin" and WXPORT == 'mac': + if sys.platform[:6] == "darwin": + libs = ['stdc++'] + NO_SCRIPTS = 1 + # @@FLAGS1@@ + # @@FLAGS2@@ + # @@FLAGS3@@ + if WXPORT == 'mac': # Flags and such for a Darwin (Max OS X) build of Python WXPLAT = '__WXMAC__' GENDIR = 'mac' - libs = ['stdc++'] - NO_SCRIPTS = 1 - if not ARCH == "": - cflags.append("-arch") - cflags.append(ARCH) - lflags.append("-arch") - lflags.append(ARCH) - #if ARCH == "ppc": - # cflags.append("-isysroot") - # cflags.append("/Developer/SDKs/MacOSX10.3.9.sdk") - - if not os.environ.get('CC') or not os.environ.get('CXX'): - os.environ["CXX"] = "g++-4.0" - os.environ["CC"] = "gcc-4.0" - os.environ["CPP"] = "cpp-4.0" - else: # Set flags for other Unix type platforms GENDIR = WXPORT @@ -1070,14 +1060,6 @@ elif os.name == 'posix' or COMPILER == 'mingw32': cflags += portcfg.split() - # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but - # wx-config doesn't output that for some reason. For now, just - # add it unconditionally but we should really check if the lib is - # really found there or wx-config should be fixed. - if WXPORT != 'msw': - libdirs.append("/usr/X11R6/lib") - - # Move the various -I, -D, etc. flags we got from the *config scripts # into the distutils lists. cflags = adjustCFLAGS(cflags, defines, includes)