Compiling PythonMagick with MacPorts python, imagemagick, boost?

Ryan Schmidt ryandesign at macports.org
Wed Dec 8 14:03:29 PST 2010


On Dec 8, 2010, at 15:09, Leonard Lin wrote:
> Hmm, so in the config, BOOST_CPPFLAGS and BOOST_LDFLAGS were set w/ the
> -I and -L but the bare CPPFLAGS and LDFLAGS weren't.  I manually added
> the flags to the Makefiles and so it finds the .hpp files.  However it
> throws errors looking for the python.h Python headers.
> 
> Sure enough, there don't seem to be any (they should be in
> /opt/local/include/python2.7 right?).  I'm looking to see if there's an
> equivalent to python-devel (or if there was some python27 variant I
> missed) but can't seem to find it.  Do you know by off chance how to get
> the python headers installed?

MacPorts does not use the convention that some other package managers use, where ports are split into "regular" ports that provide libraries and binaries and "development" ports that provide headers; instead, all parts are included in the same port. So any headers that exist should already be installed.

MacPorts does have development ports, but they serve a completely different purpose; for further reading, see:

http://trac.macports.org/ticket/14540


Are you sure you mean python.h? Are you sure you don't mean python.hpp as in the error message? python.hpp appears to be part of boost, installed on my system at /opt/local/include/boost/python.hpp. Or perhaps you meant Python.h, which is indeed a part of python27; you can see where it is by examining the output of "port contents python27".





More information about the macports-users mailing list