[Zope] one step closer to connecting Zope to MySQL
Paul Zwarts
paz@oratrix.com
Thu, 7 Jun 2001 15:28:54 +0200
Ahah, there it is.
You have mistaken the mysql-python module for something that zope uses. It
does, but not from there. Your ZMysqlDA is the zope product that sits in
lib/python/Products/ directory and follows the load init.py on startup. The
Mysql-Python is a different type of beast that supplies python with the .pys
for mysql access. Zope does use it too, but that was what I was trying to
explain
When compiling Mysql-Python, it looks for your $pythonhomedir and then
appends the path with where it wants to go. If you install Zope from binary,
often there is a python executable only for zope (for windows at least). The
Zope binary install is designed to run from the box unlike a source
installation that will use the resident machine's python homedir which
usually is in /usr/local/somewhere (i think).
So Mysql-python, like I said sticks a few _mysql thingies into the
python/site-packages directory. You have to worry about two things now.
1) Where is my python being loaded from?
2) Did I compile the Mysql-python correctly and where did the compiled files
goto?
Extrapolate the answers from both and you should a) know where to find the
compiled files and b) where to put them for your zope.
I hope I didnt confuse you more, but it was a pain for me as well. I did end
up getting it by almost luck by copying the _mysql* to various places in the
Zope/lib/python dir.
You can use the verbose option when compiling the mysql-python first, and
then you can use the -D in Zope/start file to see whats going on further.
Cheers,
Paz
-----Original Message-----
From: Horst Wald [mailto:horstwald@hotmail.com]
Sent: 07 June 2001 15:17
To: paz@oratrix.com
Cc: zope@zope.org; website-talk-admin@list.ora.com
Subject: RE: [Zope] one step closer to connecting Zope to MySQL
Hi!
Do a find for the
>_mysql* (dont actually think there is a _mysql like that but other files
>with an appendation) and then you can try putting with the operative python
I already did. I have no _mysql or _mysql.so, only
./usr/zope/lib/python/Products/MySQL-python-0.3.5/_mysql_const
./usr/zope/lib/python/Products/MySQL-python-0.3.5/_mysqlmodule.c
the first of which is a directory and the second a C-source-file (so both
are not the ones I need)
Do I really have to install Zope from binary? Can't I just download that
stupid _mysql or _mysql.so file from somewhere and place it in
blablabla/python1.5/site-packages?
Horst
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.