Meaning of

Marcus mcalhoun at
Mon Jul 14 14:48:36 PDT 2008

Rainer Müller <raimue at ...> writes:

> Rainer Müller wrote:
> > I think there is some problem with the python25 framework port. I can 
> > reproduce the message here and will see if I can find a solution.
> I am still trying to figure out where graphviz or swig pick up the path 
> to the framework directory, but I can't find it. It needs to be changed 
> to point to ${prefix}/lib/python25 instead there. Any help appreciated.
> If nothing else works, I would have to change the default path of the 
> site-packages to be inside the framework and add the symlink at 
> ${prefix}/lib/python25. But that means, everyone would be forced to 
> reinstall any port using python25. And the same change would be needed 
> for python24 and python30 as it could appear there, too.
> My plan with the symlink in the direction framework -> lib was to avoid 
> unnecessary reinstalls.
> Rainer

I believe that in both cases, the problem lies in sys.prefix, which is

Just out of curiosity, why is ${prefix}/lib/python25 even necessary?

The package swig picks up the framework directory via the statement
in the configure script:
PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null`

The package graphviz picks up the framework directory via the script
An equivalent statement is
/opt/local/bin/python2.5 -c
"import sys; from distutils import sysconfig;
print sysconfig.get_python_lib(1,0)"

sysconfig.get_python_lib in turn
(defined in ${prefix}/lib/python2.5/distutils/
uses the value of sys.prefix.


More information about the macports-dev mailing list