[Zope] RE: Zope and MySQL on Windows

Deb B. intranetdeb@yahoo.com
Mon, 13 Jan 2003 06:30:18 -0800 (PST)


--0-2122816327-1042468218=:68743
Content-Type: text/plain; charset=us-ascii


I am going through the documentation for MySQL-python and aren't there a few more steps to the installation? Don't I have to edit the setup.py file for:

#!/usr/bin/env python

"""Setup script for the MySQLdb module distribution."""

import os, sys

from distutils.core import setup

from distutils.extension import Extension

import string

YES = 1

NO = 0

# set this to YES if you have the thread-safe mysqlclient library

thread_safe_library = YES

# You probably don't have to do anything past this point. If you

# do, please mail me the configuration for your platform. Don't

# forget to include the value of sys.platform and os.name.

and the following additional sections within the setup.py file:

if sys.platform == "netbsd1":

include_dirs = ['/usr/pkg/include/mysql']

library_dirs = ['/usr/pkg/lib/mysql']

and:

elif os.name == "posix": # UNIX-ish platforms not covered above

pass # default should work

or does the Windows installer that you mention take care of these settings? I somewhat doubt it because all of the author's instructions assume Linux/Unix/*ix throughout his instructions. Furthermore, which file or set of files within MYSQL-python are the Windows installer files?
And what about the settings in the setup.cfg file? Do these need to be modified for Windows installations?:

[bdist_rpm]

doc_files = README doc/*.?tml CHANGELOG

vendor = MySQL-python SourceForge Project

packager = Andy Dustman <andy@dustman.net>

distribution-name = Red Hat Linux

requires = python

build-requires = python-devel mysql-devel zlib-devel

In the author's docs he states:Windows (3.11, 95, 98, NT, 2000, CE, BSOD, XYZ, etc.)
Windows is not a supported platform. However, the setup.py script reportedly gets the job done. There is probably a link on the web page for getting a precompiled Windows installer from someone or other. Be aware that this is a user-contributed package; the author cannot help you with compiling and running under Windows.

and I ask:
Precompiled Windows installer? Where? What for (python? MYSQL-python?)?
Excuse my ignorance, but I can't second guess the settings he is requiring before setup.py or setup.cfg (or whatever other files) will render a successful installation of the MYSQL-python product.
I'd really love to be able to get this installed along with the mysqlda/db product so that I can get my web-based interfaces to mysql databases to perform better (faster) but the lack of "explicit" instructions for this non-programmer makes it very difficult. Without being a bother, can I get more "detail" in your instructions? Thanks a bunch!
 Chris Withers <chrisw@nipltd.com> wrote:Install Python 2.1
Have a look in
Use the MySQL-python windows installer.
This will want to install into the Python 2.1 you just installed, that's the 
only reason you installed it ;-)
Copy anything that has mysql in it's name from C:\Python21\lib (or whether you 
put Python21+'\lib') to lib\python of you Zope install. For me, thsi was:
_mysql.pyd
_mysql_exceptions.py
MySQLdb (a folder)
Now unpack ZMySQLDA.tgz into your Zope Products folder.
Restart Zope.

All done.

Chris



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--0-2122816327-1042468218=:68743
Content-Type: text/html; charset=us-ascii

<P>I am going through the documentation for MySQL-python and aren't there a few more steps to the installation? Don't I have to edit the setup.py file for:</P><FONT size=2>
<P>#!/usr/bin/env python</P>
<P>"""Setup script for the MySQLdb module distribution."""</P>
<P>import os, sys</P>
<P>from distutils.core import setup</P>
<P>from distutils.extension import Extension</P>
<P>import string</P>
<P>YES = 1</P>
<P>NO = 0</P>
<P># set this to YES if you have the thread-safe mysqlclient library</P>
<P>thread_safe_library = YES</P>
<P># You probably don't have to do anything past this point. If you</P>
<P># do, please mail me the configuration for your platform. Don't</P>
<P># forget to include the value of sys.platform and os.name.</P></FONT>
<P>and the following additional sections within the setup.py file:</P><FONT size=2>
<P>if sys.platform == "netbsd1":</P>
<P>include_dirs = ['/usr/pkg/include/mysql']</P>
<P>library_dirs = ['/usr/pkg/lib/mysql']</P></FONT>
<P>and:</P><FONT size=2>
<P>elif os.name == "posix": # UNIX-ish platforms not covered above</P>
<P>pass # default should work</P></FONT>
<P>or does the Windows installer that you mention take care of these settings? I somewhat doubt it because all of the author's instructions assume Linux/Unix/*ix throughout his instructions. Furthermore, which file or set of files within MYSQL-python are the Windows installer files?
<P>And what about the settings in the setup.cfg file? Do these need to be modified for Windows installations?:</P><FONT size=2>
<P>[bdist_rpm]</P>
<P>doc_files = README doc/*.?tml CHANGELOG</P>
<P>vendor = MySQL-python SourceForge Project</P>
<P>packager = Andy Dustman &lt;andy@dustman.net&gt;</P>
<P>distribution-name = Red Hat Linux</P>
<P>requires = python</P>
<P>build-requires = python-devel mysql-devel zlib-devel</P></FONT>
<P>In the author's docs he states:
<H3>Windows (3.11, 95, 98, NT, 2000, CE, BSOD, XYZ, etc.)</H3>
<P>Windows is <EM>not</EM> a supported platform. However, the <CODE>setup.py</CODE> script reportedly gets the job done. There is probably a link on the web page for getting a precompiled Windows installer from someone or other. Be aware that this is a user-contributed package; the author cannot help you with compiling and running under Windows.</P>
<P>and I ask:
<P>Precompiled Windows installer? Where? What for (python? MYSQL-python?)?
<P>Excuse my ignorance, but I can't second guess the settings he is requiring before setup.py or setup.cfg (or whatever other files) will render a successful installation of the MYSQL-python product.
<P>I'd really love to be able to get this installed along with the mysqlda/db product so that I can get my web-based interfaces to mysql databases to perform better (faster) but the lack of "explicit" instructions for this non-programmer makes it very difficult. Without being a bother, can I get more "detail" in your instructions? Thanks a bunch!
<P>&nbsp;<B><I>Chris Withers &lt;chrisw@nipltd.com&gt;</I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Install Python 2.1<BR>Have a look in<BR>Use the MySQL-python windows installer.<BR>This will want to install into the Python 2.1 you just installed, that's the <BR>only reason you installed it ;-)<BR>Copy anything that has mysql in it's name from C:\Python21\lib (or whether you <BR>put Python21+'\lib') to lib\python of you Zope install. For me, thsi was:<BR>_mysql.pyd<BR>_mysql_exceptions.py<BR>MySQLdb (a folder)<BR>Now unpack ZMySQLDA.tgz into your Zope Products folder.<BR>Restart Zope.<BR><BR>All done.<BR><BR>Chris<BR></BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>
--0-2122816327-1042468218=:68743--