[PyObjC-svn] r2389 - in branches/pyobj-22/pyobjc-core: . Modules/objc

[email protected] Tue, 12 Jan 2010 03:54:55 -0600
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue Jan 12 03:54:55 2010
New Revision: 2389

Log:
Ensure that pyobjc-core compiles with python 2.5 (and passes all tests).

Update version to 2.2.1


Modified:
   branches/pyobj-22/pyobjc-core/Modules/objc/objc-class.m
   branches/pyobj-22/pyobjc-core/Modules/objc/pyobjc.h
   branches/pyobj-22/pyobjc-core/setup.py

Modified: branches/pyobj-22/pyobjc-core/Modules/objc/objc-class.m
==============================================================================
--- branches/pyobj-22/pyobjc-core/Modules/objc/objc-class.m	(original)
+++ branches/pyobj-22/pyobjc-core/Modules/objc/objc-class.m	Tue Jan 12 03:54:55 2010
@@ -1413,7 +1413,9 @@
 		((PyTypeObject *)result)->tp_as_buffer = &nsmutabledata_as_buffer;
 	} else if (strcmp(className, "NSBlock") == 0) {
 		((PyTypeObject *)result)->tp_basicsize = sizeof(PyObjCBlockObject);
+#if (PY_VERSION_HEX >= 0x02060000)
 		PyType_Modified((PyTypeObject*)result);
+#endif
 		PyType_Ready((PyTypeObject *)result);
 	}
 

Modified: branches/pyobj-22/pyobjc-core/Modules/objc/pyobjc.h
==============================================================================
--- branches/pyobj-22/pyobjc-core/Modules/objc/pyobjc.h	(original)
+++ branches/pyobj-22/pyobjc-core/Modules/objc/pyobjc.h	Tue Jan 12 03:54:55 2010
@@ -5,7 +5,7 @@
  * Central include file for PyObjC. 
  */
 
-#define OBJC_VERSION "2.2"
+#define OBJC_VERSION "2.2.1"
 
 // Loading in AppKit on Mac OS X 10.3 results in
 // a bit less than 1500 classes.

Modified: branches/pyobj-22/pyobjc-core/setup.py
==============================================================================
--- branches/pyobj-22/pyobjc-core/setup.py	(original)
+++ branches/pyobj-22/pyobjc-core/setup.py	Tue Jan 12 03:54:55 2010
@@ -1,5 +1,13 @@
 #!/usr/bin/env python
 
+# This is a crude hack to ensure that the system version of pyobjc is not on sys.path,
+# otherwise setuptools path hack trickery causes us to test using the wrong packages on the path.
+import sys
+if '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC' in sys.path:
+    sys.path.remove('/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC')
+if '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC' in sys.path:
+    sys.path.remove('/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC')
+
 import ez_setup
 ez_setup.use_setuptools()
 
@@ -9,6 +17,7 @@
 import site
 import platform
 
+
 if 'MallocStackLogging' in os.environ:
     del os.environ['MallocStackLogging']
 if 'MallocStackLoggingNoCompact' in os.environ:

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev