Changes needed to be able to build with SWIG 1.3.24, 1.3.27 as well as
the upcoming 1.3.28, using #if statements on SWIG_VERSION. Adjustments to ownership of SWIG objects, add some destructors and explicitly disown non-window objects when their ownership is transfered to a C++ object. Since all window objects are owned by their parent, or by themselves, always set their thisown attribute to False. Explicitly set thisown to False after any Destroy() methods are called, so SWIG doesn't try to destroy them again. Etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -76,6 +76,32 @@ RELEASE_NUMBER = RELEASE_VERSION # for compatibility
|
||||
CLEANUP.append('wx/__version__.py')
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Write the SWIG version to a header file
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if USE_SWIG:
|
||||
try:
|
||||
# It may come on either stdout or stderr, depending on the
|
||||
# version, so read both.
|
||||
i, o, e = os.popen3(SWIG + ' -version', 't')
|
||||
stext = o.read() + e.read()
|
||||
import re
|
||||
match = re.search(r'[0-9]+\.[0-9]+\.[0-9]+$', stext, re.MULTILINE)
|
||||
if not match:
|
||||
raise 'NotFound'
|
||||
SVER = match.group(0)
|
||||
open('include/wx/wxPython/swigver.h', 'w').write('''\
|
||||
// This file was generated by setup.py
|
||||
|
||||
#define wxPy_SWIG_VERSION "SWIG-%s"
|
||||
''' % SVER)
|
||||
msg('Using SWIG-' + SVER)
|
||||
|
||||
except:
|
||||
msg('\nUnable to get SWIG version number\n')
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# patch distutils if it can't cope with the "classifiers" or
|
||||
# "download_url" keywords
|
||||
|
Reference in New Issue
Block a user