VER_MAJOR = 2 # The first three must match wxWidgets
VER_MINOR = 5
VER_RELEASE = 1
-VER_SUBREL = 2 # wxPython release num for x.y.z release of wxWidgets
-VER_FLAGS = "p" # release flags, such as prerelease num, unicode, etc.
+VER_SUBREL = 6 # 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"
# 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
#----------------------------------------------------------------------
def msg(text):
- if sys.setup_is_main:
+ if hasattr(sys, 'setup_is_main') and sys.setup_is_main:
print text
-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)):
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:
# 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)
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)