[Zope] MySQLDA woes with 2.4.1 RH6.1

Richard Moon richard@dcs.co.uk
Fri, 21 Sep 2001 12:18:50 +0100


Thanks for replying - do I detect a slight hint of sarcasm ?

Before attempting the installation I looked for How_toe, read the 
documention provided and checked the Zope list archive.

The documentation is not adequate. Here we go for MySQLDA
"Installation: Unpack the tarball in your Zope home, make sure you have 
MySQLdb-0.9.0 installed where Zope can find it, and restart Zope. "

where Zope can find it ???

OK so you follow the link to MySQLdb-0.9.0 - goes to sourceforge - so wher 
then - ah a docs link - what's this Using and Extend, Using the API - 
where's the 'installation bit ?' check out the General Introduction - find 
it 'should build' by using the setup.py script

So at this point I check out the How-Tos - one - but its old - says you 
have to have the source distribution for Zope AND python. Now I already 
have an earlier ZMySQLDA running and I know I didn't install from the 
Source but it was last year and I've done sooo many other things since then 
I can't remember what I did do ...

OK check out the archive - still trying to find where to unpack the MySQLdb 
tarball so that 'Zope can find it' No clues there, except Andy saying it 
doesn't have to be in the /lib/Products directory - so it CAN go there but 
perhaps it shouldn't ?

Check out the FAQ - there's something there about compiling - so I'm trying 
to create a module _mysqlmodule.so - what's that for, where does it go when 
I have compiled it ?

By now I've taken the plunge and unpacked the tarball - look at the README, 
says I need distutils if I'm running Python 1.5 but Zope 2.4 uses Python 
2.1 so guess I'm OK there (miss out an important bit of news that I need 
the development version of Python 2.1) talks about running setup.py - look 
at the setup.py script - which says shouldn't need altering for RH so run 
it. TOtally unsurpised to get an error - can't find python.h - give up at 
this point and throw myself at mercy of the list and get kicked in the head 
(while being given a useful clue).

Oh the joy of Zope.

Still don't know why it has to be so complicated - why it can't ship with 
the Zope RPM - perhaps its a kind of test.

Does anyone out there have it working - can they ship me a binary that will 
work with Zope 2.4.1, RH6.1 and tell me where to put it (steady boys).

Kind regards

Richard

At 19:15 19/09/01, you wrote:
>On Sep 19, Richard Moon <richard@dcs.co.uk> wrote:
>
> > I'm trying to use Zope to meet clients' business needs and losing money
> > working out why
> > I'm getting the following message when running setup.py (why I have to do
> > it I don't know but after you unpack the MySQLDA-python distributiion and
> > read the README you find you have to do it !) ((No I don't want to know 
> why
> > I have to do it )).
>
>That's quite a plea for help.
>
> > I'm assuming I have to have the source Zope distribution to get the 
> missing
> > Python.h for Python 2.1 ?
>
>No, you need to have the Python development package installed: 
>python-devel or
>python2-devel (if you are using RPMs). It says this right at the top of the
>README you say you don't want to know why you have to read.
>
> > Aaagh. Great job you guys doing all this Open Source stuff but soooo
> > frustrating that you can't use it without being a C and Python wizard
>
>What, following the instructions is too hard for you?
>
> > It's not like its some obscure, little used feature I'm after here. I
> > remember that survey on the Zope site that said connection to RDBMs was 
> the
> > number one interest of Zope users.
> >
> > How many people have given up on Zope for this kind of reason - thousands
> > and thousands I would guess. Most customers don't complain, they just go
> > elsewhere !!!
>
>And for that, I am grateful.
>
> > Anyway its looking for Python.h
> >
> > running build_ext
> > building '_mysql' extension
> > gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/mysql
> > -I/opt/Zope-2.4o
> > _mysql.c:31: Python.h: No such file or directory
> > _mysql.c:40: structmember.h: No such file or directory
> > error: command 'gcc' failed with exit status 1
> >
> > The only Python.h I've got is in the Python 1.5.2. that comes with 
> RH6.1. I
> > was deliberately running the Python 2.1 that comes with Zope (as it tell
> > you to), but presumably that's why I get the problem ?
>
>See above. You don't have the required development package needed to compile.
>Once you have solved that problem, you can run setup.py bdist_rpm to make an
>RPM for your platform, whatever that might be.


Richard Moon
richard@dcs.co.uk