X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73adcb015064cf4276cb38dc394011f1b4c82036..a60a147a8cf6c68936004acb9476d990d0f304af:/wxPython/config.py diff --git a/wxPython/config.py b/wxPython/config.py index 38a4abf14d..25e577433d 100644 --- a/wxPython/config.py +++ b/wxPython/config.py @@ -37,9 +37,9 @@ import distutils.command.clean VER_MAJOR = 2 # The first three must match wxWidgets VER_MINOR = 5 -VER_RELEASE = 1 -VER_SUBREL = 4 # wxPython release num for x.y.z release of wxWidgets -VER_FLAGS = "" # release flags, such as prerelease num, unicode, etc. +VER_RELEASE = 2 +VER_SUBREL = 0 # wxPython release num for x.y.z release of wxWidgets +VER_FLAGS = "p" # release flags, such as prerelease num, unicode, etc. DESCRIPTION = "Cross platform GUI toolkit for Python" AUTHOR = "Robin Dunn" @@ -87,7 +87,7 @@ BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets # Internet Explorer wrapper (experimental) BUILD_IEWIN = (os.name == 'nt') -BUILD_ACTIVEX = (os.name == 'nt') # new version of IEWIN +BUILD_ACTIVEX = (os.name == 'nt') # new version of IEWIN and more CORE_ONLY = 0 # if true, don't build any of the above @@ -101,6 +101,11 @@ SWIG = "swig" # The swig executable to use. BUILD_RENAMERS = 1 # Should we build the renamer modules too? +FULL_DOCS = 0 # Some docstrings are split into a basic docstring and a + # details string. Setting this flag to 1 will + # cause the two strings to be combined and output + # as the full docstring. + UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG and # will ensure that the right headers are found and the # right libs are linked. @@ -158,7 +163,7 @@ WXDLLVER = '%d%d' % (VER_MAJOR, VER_MINOR) #---------------------------------------------------------------------- def msg(text): - if sys.setup_is_main: + if hasattr(sys, 'setup_is_main') and sys.setup_is_main: print text @@ -211,6 +216,7 @@ for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC', 'BUILD_GIZMOS', 'BUILD_DLLWIDGET', 'BUILD_IEWIN', 'BUILD_ACTIVEX', 'CORE_ONLY', 'PREP_ONLY', 'USE_SWIG', 'UNICODE', 'UNDEF_NDEBUG', 'NO_SCRIPTS', 'NO_HEADERS', 'BUILD_RENAMERS', + 'FULL_DOCS', 'FINAL', 'HYBRID', ]: for x in range(len(sys.argv)): if sys.argv[x].find(flag) == 0: @@ -274,7 +280,8 @@ def Verify_WX_CONFIG(): -def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps=[]): +def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, + swig_deps=[], add_under=False): """Run SWIG the way I want it done""" if USE_SWIG and not os.path.exists(os.path.join(dir, gendir)): @@ -285,13 +292,21 @@ def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps= sources = [] + if add_under: pre = '_' + else: pre = '' + for file in files: basefile = os.path.splitext(file)[0] i_file = os.path.join(dir, file) - py_file = os.path.join(dir, gendir, basefile+'.py') - cpp_file = os.path.join(dir, gendir, basefile+'_wrap.cpp') + py_file = os.path.join(dir, gendir, pre+basefile+'.py') + cpp_file = os.path.join(dir, gendir, pre+basefile+'_wrap.cpp') xml_file = os.path.join("docs", "xml-raw", basefile+'_swig.xml') + if add_under: + interface = ['-interface', '_'+basefile+'_'] + else: + interface = [] + sources.append(cpp_file) if not cleaning and USE_SWIG: @@ -320,14 +335,14 @@ def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps= # Next run build_renamers to process the XML cmd = [ sys.executable, '-u', - './distrib/build_renamers.py', dir, basefile, xmltemp] + './distrib/build_renamers.py', dir, pre+basefile, xmltemp] msg(' '.join(cmd)) spawn(cmd) os.remove(xmltemp) # Then run swig for real - cmd = [ swig_cmd ] + swig_args + ['-I'+dir, '-o', cpp_file, - '-xmlout', xml_file, i_file] + cmd = [ swig_cmd ] + swig_args + interface + \ + ['-I'+dir, '-o', cpp_file, '-xmlout', xml_file, i_file] msg(' '.join(cmd)) spawn(cmd) @@ -408,7 +423,7 @@ class wx_install_headers(distutils.command.install_headers.install_headers): return root = self.root - if WXPREFIX.startswith(root): + if root is None or WXPREFIX.startswith(root): root = '' for header, location in headers: install_dir = os.path.normpath(root + WXPREFIX + location) @@ -732,6 +747,10 @@ swig_args = ['-c++', if UNICODE: swig_args.append('-DwxUSE_UNICODE') +if FULL_DOCS: + swig_args.append('-D_DO_FULL_DOCS') + + swig_deps = [ 'src/my_typemaps.i', 'src/common.swg', 'src/pyrun.swg',