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

Joe Strout joe at strout.net
Thu Jan 8 00:27:38 CET 2009


Christopher Barker wrote:

> the extensions that distutils builds will be called something like 
> _mysql. It will be in site_packages, and in your app bundle, along with 
> .py and .pyc files, NOT in with FrameWorks.

Ah, I didn't know that.  Poking around in Resources/lib (and including 
unzipping site-packages.zip), I find things like mySQL.pyc, and a 
MySQLdb folder containing a bunch of other .pyc files.  Nothing else 
though; just Python bytecode.  Is it possible that MySQLdb is written 
entirely in Python, and was never the problem at all?  I.e., that given 
a suitable portable mysql client library, MySQLdb will Just Work?

But OK, now this brings up the question of why my 
libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a 
UB version of MySQL (c.f. the "Installing MySQL" section of 
<http://www.dotancohen.com/howto/python-app-mac.html>).  (I'm going to 
do a fresh download of that mysql binary package and poke around inside 
to see what I find.)

> You can find what it builds in the "build" directory that distutils 
> creates when you run "setup.py build". It will be in something like:
> 
> build/lib.macosx-10.3-ppc-2.5
> 
> and I think will be called -mysql.so

But now I'm confused again.  I thought this library was part of the 
mysql distribution -- not something created by the Python script 
(indeed, not something specific to Python at all).  If that's so, why 
would "setup.py build" have anything to do with it?

Thanks for your patience,
- Joe




More information about the Pythonmac-SIG mailing list