From 820ef9b5c9d491084b42fc5d84889deb4eb30976 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 9 Feb 2012 05:41:35 +0000 Subject: [PATCH] Switch to sip 4.13.1, fix build script for Lion/Xcode4 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- bin/build-sip-posix | 28 +++++++++++++++++++++++----- build.py | 11 ++++++----- sip/siplib/sip.h | 2 +- sip/siplib/siplib.c | 3 +++ 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/bin/build-sip-posix b/bin/build-sip-posix index 0a46169c..ae458298 100755 --- a/bin/build-sip-posix +++ b/bin/build-sip-posix @@ -18,15 +18,26 @@ SIPVER=`$PYTHON configure.py --version | grep -v "This is SIP"` PLATFORM=`$PYTHON -c "import sys; print sys.platform"` if [ "$PLATFORM" = "darwin" ]; then - # try to ensure compatiblity back to 10.4 + # try to ensure compatiblity back to 10.4 if we can + xcode=$(xcode-select -print-path) + if [ -d $xcode/SDKs/MacOSX10.4u.sdk ]; then + SDK=$xcode/SDKs/MacOSX10.4u.sdk + TARGET=10.4 + elif [ -d $xcode/SDKs/MacOSX10.5.sdk ]; then + SDK=$xcode/SDKs/MacOSX10.5.sdk + TARGET=10.5 + elif [ -d $xcode/SDKs/MacOSX10.6.sdk ]; then + SDK=$xcode/SDKs/MacOSX10.6.sdk + TARGET=10.6 + SDKWARNING=yes + fi $PYTHON configure.py \ - --universal \ - --deployment-target=10.4 \ - --sdk=MacOSX10.4u.sdk \ + --deployment-target=$TARGET \ + --sdk=$SDK \ --sip-module wx.siplib \ $* - make -C sipgen CC=gcc-4.0 CXX=g++-4.0 clean all + make -C sipgen CC=gcc-4.0 CXX=g++-4.0 LINK=g++-4.0 clean all else $PYTHON configure.py \ --sip-module wx.siplib \ @@ -46,6 +57,13 @@ echo "If ready to upload then do these commands now:" echo " bzip2 $MYBINDIR/sip-$SIPVER-$PLATFORM" echo " scp $MYBINDIR/sip-$SIPVER-$PLATFORM.bz2 robind@riobu.com:/home/robind/domains/wxpython.org/htdocs/tools" +if [ "$SDKWARNING" == "yes" ]; then + echo "" + echo "WARNING: The 10.6 SDK was used. If you have Xcode3 installed it might be better" + echo "to switch to it using xcode-select so a 10.4 or 10.5 SDK will be used instead," + echo "just in case some build-bots are running earlier versions of OSX." + echo "" +fi # myCFLAGS="-ggdb" diff --git a/build.py b/build.py index 1be65c86..b241d574 100755 --- a/build.py +++ b/build.py @@ -38,11 +38,11 @@ unstable_series = (version.VER_MINOR % 2) == 1 # is the minor version odd or ev isWindows = sys.platform.startswith('win') isDarwin = sys.platform == "darwin" -sipCurrentVersion = '4.13.1-snapshot-7ab562ae0e39' +sipCurrentVersion = '4.13.1' sipCurrentVersionMD5 = { - 'darwin' : '2da0cc2ba853b2787499da0596b4e8ac', - 'win32' : '45673b36d6885632ad0f273c496a1383', - 'linux2' : 'f7971044b97f7fc7650fef2189517937', + 'darwin' : '542198b5a4b05a65c41ac888bc59f779', + 'win32' : '2a7194cbfbca8d0110c68857a94e0efa', + 'linux2' : '0049b8d33e83ae008fc2664ded4eb567', } toolsURL = 'http://wxpython.org/Phoenix/tools' @@ -210,8 +210,9 @@ def setDevModeOptions(args): # These will be ignored on the other platforms so it is okay to # include them unconditionally '--osx_cocoa', + '--mac_arch=x86_64', #'--osx_carbon', - '--mac_arch=i386', + #'--mac_arch=i386', ] if not isWindows: myDevModeOptions.append('--debug') diff --git a/sip/siplib/sip.h b/sip/siplib/sip.h index 11d259ee..e314be24 100644 --- a/sip/siplib/sip.h +++ b/sip/siplib/sip.h @@ -55,7 +55,7 @@ extern "C" { * Define the SIP version number. */ #define SIP_VERSION 0x040d01 -#define SIP_VERSION_STR "4.13.1-snapshot-7ab562ae0e39" +#define SIP_VERSION_STR "4.13.1" /* diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c index 8962c0a9..3f3aa338 100644 --- a/sip/siplib/siplib.c +++ b/sip/siplib/siplib.c @@ -5729,6 +5729,9 @@ static PyObject *pickle_type(PyObject *obj, PyObject *ignore) */ init_args = ctd->ctd_pickle(sip_api_get_cpp_ptr((sipSimpleWrapper *)obj, NULL)); + if (init_args == NULL) + return NULL; + if (!PyTuple_Check(init_args)) { PyErr_Format(PyExc_TypeError,