[Chimera-users] new version available

Thomas Goddard goddard at cgl.ucsf.edu
Wed Dec 14 09:43:27 PST 2005

Hi Charlie,

  You will need the Mac Python configuration header file pyconfig.h to
compile your Python module on the Mac and have it work with Chimera.
I added Chimera and third party header files for the Mac to our source
code download page:


  Compiling a python module on the Mac also involves some special linking
flags.  The Mac has "dynamic libraries" and "bundles" and as far as I know
Python can only import bundles.  That was the case a few years ago.  Here
are a couple link examples that make bundles on the Mac.

  gcc -I/usr/local/src/staff/goddard/mac-10.4/build/include
      -bundle -bundle_loader /usr/local/src/staff/goddard/mac-10.4/foreign/Python-2.4/bin/python2.4
      Scientific_netcdf.o -Lnetcdf/lib -lnetcdf -o Scientific_netcdf.so

  cc -bundle -bundle_loader /usr/local/src/staff/goddard/builds/mac-10.3/chimera-2095/build/bin/python2.4
     -o _contour.so -O -Wall -Wno-long-double
     contourdata.o pycontour.o _contour.o ContourObject.o
     -L../_volumearray -lrcarray -lwrappy  -lstdc++ 

The flags -bundle and -bundle_loader <path-to-python-executable> are the
important ones.  These replace the usual -shared on other platforms.
I'm not sure about -DUSE_DYLD_GLOBAL_NAMESPACE -- we don't use that for
building the python modules we write but it appears that third-party
packages we use define that macro.


More information about the Chimera-users mailing list