[Zope] MySQLDA woes with 2.4.1 RH6.1

Richard Moon richard@dcs.co.uk
Fri, 21 Sep 2001 17:54:06 +0100


>
>You can add additional directories to search for include files in
>setup.py:
>
>if sys.platform == "linux-i386": # Red Hat
>     include_dirs = ['/usr/include/mysql','/opt/Python-2.1.1/Include']
>     library_dirs = ['/usr/lib/mysql']
>     libraries = [mysqlclient, "z"]
>     runtime_library_dirs = []
>     extra_objects = []

OK I did that, I found though that I was still getting the can't find 
Python.h error - so I printed sys.platform and found it contained the value 
'linux2'. So I changed the line to
if sys.platform == "linux2": # Red Hat

and it got past the Python.h error - however it then errored with

In file included from _mysql.c:31:
/opt/Python-2.1.1/Include/Python.h:24: config.h: No such file or directory
In file included from /opt/Python-2.1.1/Include/Python.h:54,
                  from _mysql.c:31:
/opt/Python-2.1.1/Include/pyport.h:4: config.h: No such file or directory
In file included from /opt/Python-2.1.1/Include/Python.h:54,
                  from _mysql.c:31:
/opt/Python-2.1.1/Include/pyport.h:404: #error "could not set LONG_MAX in 
pypor"
error: command 'gcc' failed with exit status 1

Any ideas ?

Thanks.

Richard

Richard Moon
richard@dcs.co.uk