Re: [Pyobjc-dev] was: [Swig] Swig for Mac OSX - Objective-C?
Brought to you by:
ronaldoussoren
From: Steven D. M. <sd...@mi...> - 2002-01-29 21:48:56
|
On Tue, 29 Jan 2002, Bob Savage wrote: > :: Moved discussion to pyo...@li... because we strayed > significantly from Swig :: > > on 1/29/02 12:50 PM, Steven Majewski wrote: > > > > pyobjc doesn't build with python 2.2 because of a bug in python 2.2 that's > > fixed in CVS > > > > Include/abstract.h change this line: > > #define PyMapping_DelItemString(O,K) PyObject_DelItemString((O),(K)) > > > > back to what it was in 2.1: > > #define PyMapping_DelItemString(O,K) PyDict_DelItemString((O),(K)) > > > > I checked out the pyobjc from CVS, and ran "setup.py install" (probably with > the 2.2 version of Python, in case that makes a difference). > I believe that *does* make a difference: one of the features of distutils is that, since you're running Python, it knows which version you're running and where it's libraries are installed, etc. If you have several versions installed, you can explicitly run 'python2.1' or you can give an entire path for an uninstalled version ( '/usr/local/ src/Python-2.2/python.exe' for example. ) > Then I started the 2.1 version of Python, added the 2.1 modules to the end > of the python_path, and got the following error: > > >>> import pyobjc > dyld: /usr/local/bin/python2.1.exe Undefined symbols: > _PyObject_DelItemString > _PyType_IsSubtype > > If I understand what you said above, I should not see this error under 2.1? To be more exact and precise: I did my diffs on 2.1.2 and 2.2 -- I didn't believe that this was in 2.1 or 2.1.1 but I'm not absolutely sure. (But that PyObject_DelItemString may be from running setup.py from 2.2) > > There seem to be a few problems using AppKit GUI classes from a unix > > command line program running from Terminal.App -- there may also be > > a few Carbon problems, but I don't know if they are as bad. Is that > > what you're talking about doing, or are you going to roll your own > > command line front end? > > We use the distributed object architecture (through an NSConnection). It > works quite well for GnuPlot. Does it also use NSProxy ? (Just wondering if you have more know-how than I do for debugging my pyobjc problem! ;-) Giving the 2.2 bug a little more thought: I THINK that if I build a pyobjc.so with a patched 2.2, it should work with an unpatched 2.2 binary. It's the wrong symbol in Python's Include file that causes pyobjc to bind to symbol that's not there. If that is true, I'll probably roll out another distribution, as well as a 2.2 pyobjc.so binary whether or not I can find and fix that one-last-bug! -- Steve Majewski |