Stupid MySQL Python with Stupid 64 bit MySQL on Stupid 64 bit Snow Leopard (Part 2)
So…
Now that it’s morning, I went back to square 1 and killed the build directory again.
Set the architecture flags as before, and rebuilt.
Then, I ran:
# sudo python setup.py install
And noticed that it is building the library again, a completely different way before installing!
What the Heck is Going On?!
Whereas before, I had one directory and one temp directory in my build subdirectory, I now have TWO libraries built.
One right, one not.
)# ll build total 0 drwxr-xr-x 7 ssteiner staff 238 Dec 31 09:26 . drwxr-xr-x 29 ssteiner staff 986 Dec 31 09:25 .. drwxr-xr-x 2 root staff 68 Dec 31 09:26 bdist.macosx-10.3-fat drwxr-xr-x 5 root staff 170 Dec 31 09:26 lib.macosx-10.3-fat-2.6 drwxr-xr-x 5 ssteiner staff 170 Dec 31 09:25 lib.macosx-10.3-x86_64-2.6 drwxr-xr-x 3 root staff 102 Dec 31 09:26 temp.macosx-10.3-fat-2.6 drwxr-xr-x 3 ssteiner staff 102 Dec 31 09:25 temp.macosx-10.3-x86_64-2.6
I didn’t tell it to build a fat one, I told it to build the x86_64 one. It decided to build the other one when I went to install the one I had built.
Now we’re getting somewhere…
Because, like everyone else, I was building as my regular user, but installing with `sudo`, the `sudo` shell didn’t have the architecture set and, so, built a 32 bit OS X 10.3 compatible version, then installed that.
The Solution
By using a virtualenv, you don’t have to switch users to get it to install and, therefore, you don’t get a second build.
Jeez, that was stupid…