How do I build my own Python version? (Mac)

Last edited on

For Python, by default Squish links against the shared Python library.

On Mac OS X it is possible to build Python either as a framework (which produces a shared Python library), or not as a framework (in which case, up to Python 2.5.1 you will always get a static library).

The framework case is straightforward, but if you don’t use a framework then the situation is slightly tricky because Squish will need to dynamically link against a static Python library. This can be done by making sure that the static Python library is compiled using the -fno-common option.

To specify this option for Python, you can set the BASECFLAGS environment variable before configuring Python:

BASECFLAGS="-fno-common" ./configure --prefix ...