I managed to make distutils believe that Python was built on Leopard by inserting the following code before calling setup () in setup.py:
from distutils import sysconfig
their_parse_makefile = sysconfig.parse_makefile
def my_parse_makefile(filename, g):
their_parse_makefile(filename, g)
g['MACOSX_DEPLOYMENT_TARGET'] = '10.5'
sysconfig.parse_makefile = my_parse_makefile
Then pycrypto works well on Snow Leopard using python2.5, after setting MACOSX_DEPLOYMENT_TARGET to "10.5". I cannot guarantee that it will work well, but the pycrypto suite of test suites went with this build on my Macbook Air running Leopard, so everything seems to be in order.
source
share