X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8994c3c20cae2b27f479fefe8d4190d9bffb8cad..af77752fc08969fc0d4b7e1151fbf9707272b596:/wxPython/setup.py?ds=sidebyside diff --git a/wxPython/setup.py b/wxPython/setup.py index ba32bc46af..8bb5d32347 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python #---------------------------------------------------------------------- -import sys, os, glob, fnmatch +import sys, os, glob, fnmatch, tempfile from distutils.core import setup, Extension from distutils.file_util import copy_file from distutils.dir_util import mkpath @@ -17,7 +17,7 @@ VER_MAJOR = 2 # The first three must match wxWindows VER_MINOR = 5 VER_RELEASE = 1 VER_SUBREL = 0 # wxPython release num for x.y.z release of wxWindows -VER_FLAGS = "p4" # release flags, such as prerelease num, unicode, etc. +VER_FLAGS = "p7" # release flags, such as prerelease num, unicode, etc. DESCRIPTION = "Cross platform GUI toolkit for Python" AUTHOR = "Robin Dunn" @@ -64,7 +64,7 @@ BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets # to be loaded from a DLL and to be used from Python. # Internet Explorer wrapper (experimental) -BUILD_IEWIN = 0 #(os.name == 'nt') +BUILD_IEWIN = (os.name == 'nt') CORE_ONLY = 0 # if true, don't build any of the above @@ -223,7 +223,10 @@ def Verify_WX_CONFIG(): else: uf = '' ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR) - WX_CONFIG = 'wx%s%s%s-%s-config' % (WXPORT, uf, df, ver2) + port = WXPORT + if port == "x11": + port = "x11univ" + WX_CONFIG = 'wx%s%s%s-%s-config' % (port, uf, df, ver2) searchpath = os.environ["PATH"] for p in searchpath.split(':'): @@ -272,30 +275,28 @@ def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps= #i_file = opj(i_file) #'/'.join(i_file.split('\\')) if BUILD_RENAMERS: - #info_file = "./distrib/swig_info" - #info_dict = { 'cmd' : swig_cmd, - # 'args' : swig_args + ['-I'+dir] - # } - #open(info_file, "w").write(str(args_dict)) - + #tempfile.tempdir = sourcePath + xmltemp = tempfile.mktemp('.xml') + # First run swig to produce the XML file, adding # an extra -D that prevents the old rename # directives from being used cmd = [ swig_cmd ] + swig_args + \ - [ '-DBUILDING_RENAMERS', '-xmlout', xml_file ] + \ + [ '-DBUILDING_RENAMERS', '-xmlout', xmltemp ] + \ ['-I'+dir, '-o', cpp_file, i_file] msg(' '.join(cmd)) spawn(cmd) # Next run build_renamers to process the XML cmd = [ sys.executable, '-u', - './distrib/build_renamers.py', dir, basefile, xml_file] + './distrib/build_renamers.py', dir, basefile, xmltemp] msg(' '.join(cmd)) spawn(cmd) - #os.remove(info_file) + os.remove(xmltemp) # Then run swig for real - cmd = [ swig_cmd ] + swig_args + ['-I'+dir, '-o', cpp_file, i_file] + cmd = [ swig_cmd ] + swig_args + ['-I'+dir, '-o', cpp_file, + '-xmlout', xml_file, i_file] msg(' '.join(cmd)) spawn(cmd) @@ -521,6 +522,13 @@ elif os.name == 'posix': libdirs = [] libs = [] + # If you get unresolved symbol errors on Solaris and are using gcc, then + # uncomment this block to add the right flags to the link step and build + # again. + ## if os.uname()[0] == 'SunOS': + ## libs.append('gcc') + ## libdirs.append(commands.getoutput("gcc -print-search-dirs | grep '^install' | awk '{print $2}'")[:-1]) + cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1] cflags = cflags.split() if debug: @@ -988,7 +996,7 @@ if BUILD_STC: else: STC_H = opj(WXPREFIX, 'include/wx/stc') -## NOTE: need to add this to the stc.bkl... +## NOTE: need to add something like this to the stc.bkl... ## # Check if gen_iface needs to be run for the wxSTC sources ## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or @@ -1040,7 +1048,7 @@ if BUILD_IEWIN: USE_SWIG, swig_force, swig_args, swig_deps) - ext = Extension('iewinc', ['%s/IEHtmlWin.cpp' % location, + ext = Extension('_iewin', ['%s/IEHtmlWin.cpp' % location, '%s/wxactivex.cpp' % location, ] + swig_sources, @@ -1175,8 +1183,8 @@ else: ] -DATA_FILES += find_data_files('wxPython/tools/XRCed', '*.txt', '*.xrc') -DATA_FILES += find_data_files('wxPython/py', '*.txt', '*.ico', '*.css', '*.html') +DATA_FILES += find_data_files('wx/tools/XRCed', '*.txt', '*.xrc') +DATA_FILES += find_data_files('wx/py', '*.txt', '*.ico', '*.css', '*.html') DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')