[Python-Dev] Testing 3.3 framework builds on OS X (original) (raw)

Ned Deily nad at acm.org
Tue Jul 10 19:27:31 CEST 2012


In article <CAAgNOZ31o0Rpm8Uby14BzeTXrJ4TT2LFi0_sg8dNsgB+H9oBJQ at mail.gmail.com>, Marc Abramowitz <msabramo at gmail.com> wrote:

Anyone know how to build and run tests on an OS X build with ‹enable-framework, without installing the framework? I want to test that something works in my tree without polluting /Library/Frameworks with stuff that could mess up future tests.

I've been mucking around with DYLDFRAMEWORKPATH but not having much luck. If I build with ./configure --enable-framework --with-dtrace && make and use DYLDFRAMEWORKPATH=. then I suspect it's still loading from /Library/Frameworks, because my tests fail in a way that suggests it's not finding the new bits in my working directory. If I build with ./configure --enable-framework=. --with-dtrace && make and use DYLDFRAMEWORKPATH=., then it fails with: dyld: Library not loaded: ./Python.framework/Versions/3.3/Python presumably because ./Python.framework doesn't have any .dylib's or .so's.

Read the updated Mac/README for more information about framework builds.
Here's a sample configure I use to minimize the chances of pollution from other installed Pythons:

BASEDIR="$(dirname $(pwd -P))" [ -n "${BASEDIR}" ] && ./configure --enable-universalsdk --with-universal-archs=intel --enable-framework="${BASEDIR}"/root/Library/Frameworks --with-framework-name=pytest_10_7 --with-pydebug && rm -rf "${BASEDIR}"/root/* || echo "ERROR: configure failed"

This is for 3.3 on 10.7. For 3.2 and 2.7 at the moment you also need to explicitly set MACOSX_DEPLOYMENT_TARGET=10.7 and CC=clang.

The framework path probably needs to be an absolute path, BTW.

-- Ned Deily, nad at acm.org



More information about the Python-Dev mailing list