[Pythonmac-SIG] How to get setuptools to build a Universal Binary?

Christopher Barker Chris.Barker at noaa.gov
Thu Jan 8 19:19:07 CET 2009


Joe Strout wrote:
> Hmm.  This doesn't appear to have worked, but it's failing in an odd way 
> that I don't understand.  Here's what I did:
> 
> 1. The above copying, vebatim.
> 2. In the MySQL-python-1.2.2 source directory:
>    2a. sudo python setup.py clean

I recommend actually deleting the build and dist directories -- 
distutils in not all that good at cleaning up.

>  ImportError: No module named MySQLdb

that is odd.


 > why is py2app suddenly failing to realize that it should include MySQLdb?

One guess -- I think "setup.py install" puts a zipped egg in by default, 
and py2app does not work well with zipped eggs. I couldn't figure out 
how to tell it not to do that (with easy install, you pass the -Z 
option). However, I set a preferences file so that it would never put in 
zipped eggs:

by creating a .pydistutils.cfg  file in your home dir, and putting:

[easy_install]
zip-ok = 0

in it. (I found that on the web somewhere...)


Take a look at the other note I jsut posted -- I have successfully build 
a Universal version that is statically linked to the mysql lib -- though 
I don't know if it works beyond importing-- can you test for me?

-Chris

PS: I think you may owe me two beers now ;-)



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list