|
Graham Dumpleton
grahamd at dscpl.com.au
Tue Feb 15 20:06:14 EST 2005
The problem is that the libpython2.4.a is a static library and there is not a dynamically loadable library. See following comment from the mod_python README file: 3. On Darwin, libpython cannot be linked statically with mod_python using libtool. libpython has to be a dynamic shared object. The Python distribution does not provide a way of building libpython as a shared library, but the Fink Python distribution comes with one (/sw/lib/python2.2/config/libpython2.2.dylib), so the easiest thing is to install Python from Fink (fink.sourceforge.net). I would assume the same comment applies if building your own version of Python on full MacOSX and where a framework install wasn't done. Normally with a framework install, the dynamically loadable version is installed under the framework package as: /System/Library/Frameworks/Python.framework/Versions/2.3/Python If you run "otool -L" on your old mod_python.so which used standard Python version, that is what you should have seen. Your options thus seem to be: 1. Use standard Python 2.3 shipped with MacOSX. 2. Use Python 2.4 provided with "fink" packages. 3. Install Python 2.4 as a framework but make sure you install it such that you don't overwrite the standard Python installation. The safest and quickest thing to do is use Python 2.3 shipped with the box. Using fink means a lot of crap get installed on your box that you might not want. Installing Python 2.4 runs the risk of trashing your system version of Python if you do the wrong thing. Graham John Raines wrote .. > The libraries certainly seem to be there: > > jraines-Computer:/usr/local jrraines$ ls lib/python2.4/config > Makefile Setup Setup.config Setup.local > config.c config.c.in install-sh libpython2.4.a > makesetup python.o > jraines-Computer:/usr/local jrraines$ ls > lib/python2.4/site-packages/mod_python > Cookie.py Session.py __init__.py _psp.so > apache.pyo cgihandler.pyo psp.pyo publisher.pyo > util.pyo > Cookie.pyc Session.pyc __init__.pyc apache.py > cgihandler.py psp.py publisher.py util.py > Cookie.pyo Session.pyo __init__.pyo apache.pyc > cgihandler.pyc psp.pyc publisher.pyc util.pyc > > jraines-Computer:/usr/local jrraines$ ls > apache2 bin include lib man share > > jraines-Computer:/usr/local jrraines$ ls bin > AlchemyTVSetTuner pcpmac pmvmac > psync python2.4 > idle pgetfinfo psetfinfo > pydoc smtpd.py > > jraines-Computer:/usr/local jrraines$ ls lib/python2.4/lib-dynload > ColorPicker.so _Evt.so _Qt.so > _csv.so audioop.so gestalt.so > regex.so > MacOS.so _File.so _Res.so > _curses.so autoGIL.so grp.so > resource.so > Nav.so _Fm.so _Scrap.so > _curses_panel.so binascii.so icglue.so > rgbimg.so > OSATerminology.so _Folder.so _Snd.so > _heapq.so bsddb185.so imageop.so > select.so > _AE.so _Help.so _TE.so > _hotshot.so bz2.so itertools.so > sha.so > _AH.so _IBCarbon.so _Win.so > _locale.so cPickle.so math.so > strop.so > _App.so _Icn.so _bisect.so > _multibytecodec.so cStringIO.so md5.so > struct.so > _CF.so _Launch.so _bsddb.so > _random.so cmath.so mmap.so > syslog.so > _CG.so _List.so _codecs_cn.so > _socket.so collections.so nis.so > termios.so > _CarbonEvt.so _Menu.so _codecs_hk.so > _ssl.so crypt.so operator.so > time.so > _Cm.so _Mlte.so _codecs_iso2022.so > _testcapi.so datetime.so parser.so > timing.so > _Ctl.so _OSA.so _codecs_jp.so > _tkinter.so dbm.so pwd.so > unicodedata.so > _Dlg.so _Qd.so _codecs_kr.so > _weakref.so fcntl.so pyexpat.so > zlib.so > _Drag.so _Qdoffs.so _codecs_tw.so > array.so gdbm.so readline.so > > I thought linking Mod_Python to the Python 2.4 code was taken care of > by the "--with-python=/usr/local/bin/python2.4" ? It seems to have > gotten the site-packages directory put into the right location. > > On Feb 15, 2005, at 5:50 PM, Graham Dumpleton wrote: > > > If you really want to use Python 2.4, you are going to have to somehow > > force a reference to the Python library in mod_python.so. Since you > > aren't > > using a framework install, not sure what the library is you have to > > force > > link with. You might want to look for Python related libraries in such > > directories as: > > > > /usr/local/lib > > /usr/local/lib/python2.4/config > > > > BTW, is there anything you really want in Python 2.4? Especially if > > you are > > a UNIX novice, trying to host two different versions of Python on > > MacOSX > |