title: mysql-python: building a completely standalone _mysql.so on Mac OS X?
body: <p>I'm running a database server in a Linux VM (Ubuntu 9.10) under VMware Fusion, but coding Django on the Mac side. Installing mysql-python requires that MySQL is installed on the Mac for compiling <code>_mysql.so</code> into <code>site-packages</code>.</p>
  
  <p>However, after this is done, I have no further use for MySQL on the Mac side, and would rather just delete it. Of course, this is not possible when _mysql.so requires <code>/usr/local/mysql/lib/libmysqlclient_r.16.dylib</code>.</p>
  
  <p>There is a "static" option in mysql-python's <code>site.cfg</code>, which, when set to "true", significantly increases the size of the <code>_mysql.so</code> file, but it <em>still</em> depends on the .dylib.</p>
  
  <p>Is there a way of making the .so completely independent of whether MySQL is installed or not, even if that means making the file enormous?</p>
  
  <p>The solution, if one exists, should work on both 10.5 and 10.6, since I'll be using both versions on different machines for the time being.</p>