[Pythonmac-SIG] How to get setuptools to build a Universal Binary?
Daniel Miller
daniel at keystonewood.com
Wed Jan 7 21:35:06 CET 2009
> MySQLdb instead uses setuptools.
>
> So: does anyone have a clue how I can convince setuptools to build
> a PPC
> binary (or better yet, a Universal one) on an Intel machine?
I just downloaded the mysqldb module from sourceforge to have a look
at how it decides how to compile its C extension. It looks like it's
getting the CFLAGS and LFLAGS from mysql_config. You'll need a
universal binary of libmysqlclient (as Chris already pointed out). At
any rate, you'll want to try to see what CFLAGS/LFLAGS were used to
compile libmysqlclient. You might try to run the following command in
terminal:
$ mysql_config --cflags
Which may shed some light on the situation. You'll be looking for
something like this in the output:
-arch ppc -arch i386
Which tells the compiler to include these architectures in the
resulting binary. As Chris already mentioned, you'll also need a
universal Python--I'm assuming you've already got that... Good luck.
~ Daniel
More information about the Pythonmac-SIG
mailing list