MySQL-Python on OS X

Craig Amundsen amundsen463 at yahoo.com
Tue Sep 9 16:00:05 EDT 2003


Hi -

I'm trying to build the MySQL-Python module v0.9.2 on OS-X 10.2 for
the latest MySQL from Fink. I  have also installed the fink version of
Python (2.2.2).

I have made all the recommended changes to setup.py that I have been
able to find.

I have changed thread_safe_library from YES to NO

I have changed 
mysqlclient = thread_safe_library and "mysqlclient_r" or "mysqlclient"
to
mysqlclient = thread_safe_library and "mysqlclient"

and in the darwin section I have changed
include_dirs.append('/sw/include')
library_dirs.append('/sw/lib')
to
include_dirs.append('/sw/include/mysql')
library_dirs.append('/sw/lib/mysql')

when I run
/sw/bin/python setup.py build
I get this error:
line 1033, in gen_lib_options
  File "/sw/lib/python2.2/posixpath.py", line 65, in split
    i = p.rfind('/') + 1
AttributeError: 'int' object has no attribute 'rfind'

It looks like p is supposed to be a string containing a path, but
instead is an int. I have not seen this error mentioned anywhere in my
searches. Does anyone have any hints on how I can get this module to
build?

TIA,
- Craig




More information about the Python-list mailing list