python25 framework build
Isak Johnsson
isak at hypergene.com
Tue Oct 23 02:33:23 PDT 2007
Dear Mac-Flossers!
This is how I got a framework build of python25. It's a strange fix,
but I don't know how to do it better. Anyhow, I hope it can provide
some information so we can get a smooth framework into the portfile.
Also, I wish to thank you all MacPorts workers for your great
contributions.
Rationale: framework is needed for ipython+matlotlib+wxagg and GNU
Radio. I want the MacPorts python package rather than a manual
install, because I use so many other packages depending on it.
Not sure if --enable-toolbox-glue without --enable-framework would
satisfy wxpython, but reading some mail about pythonw, everyone
mentions the framework builds.
References:
http://trac.macports.org/projects/macports/ticket/12817
http://lists.macosforge.org/pipermail/macports-dev/2007-October/
002998.html
In the python25 portfile, add this:
variant framework {
configure.args-delete --disable-framework
configure.args-append --enable-framework=${prefix}/Library/
Frameworks
configure.args-append --enable-toolbox-glue
patchfiles-delete patch-configure
patchfiles-delete patch-Makefile.pre.in
}
...and remove this (they will be built with 2.5 as filename suffix):
foreach bin {idle pydoc smtpd.py} {
move ${destroot}${prefix}/bin/${bin} \
${destroot}${prefix}/bin/${bin}${branche}
}
$ sudo install python25 +framework
...build goes on, and fails during the build stage...
$ cd "/opt/local/var/macports/build/
_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_py
thon25/work/Python-2.5.1"
$ sudo ./configure --prefix=/opt/local --enable-shared --mandir=/opt/
local/share/man --with-cxx=/usr/bin/g++-4.0 --enable-framework=/opt/
local/Library/Frameworks --enable-toolbox-glue
...(this line came from config.log)...
$ sudo make
$ cd
$ sudo install python25 +framework
...build restarts, now reconfigured and working...
I "solved" some module path problems this way (perhaps the real
solution lies in the omitted patches?):
$ sudo ln -s /opt/local/lib/python2.5/site-packages /opt/local/
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
Sincerely,
Isak Johnsson
More information about the macports-dev
mailing list