aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python/README.linux
blob: 66b0346c8266990eebb6255298304d84e5ae71c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Thanks to thilo@eevolute.com and others for this README and the RPM

Note: The precompiled RPM package is not available at www.eevolute.com.
  You may use the spec file provided with PyGreSQL to build your
  own package.
    Hartmut Goebel <hartmut@goebel.noris.de>


INSTALLING PyGreSQL on Redhat Linux 5.1 or 5.2
==============================================

Things are pretty easy on Redhat Linux.  You can either get a precompiled
RPM package from

        ftp://www.eevolute.com/pub/python/

or try in compile and install it yourself:

bash$ make redhat       # this just compiles the module as a shared object
cc -fpic -shared -o _pg.so -I/usr/include/python1.5 pgmodule.c -lpq
bash$ python            # you can test it from your local directory
Python 1.5.1 (#1, May  6 1998, 01:48:27)  [GCC 2.7.2.3] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import _pg
>>> db = _pg.connect('thilo', 'localhost')
>>> db.query("INSERT INTO test VALUES ('ping', 'pong')")
18304
>>> db.query("SELECT * FROM test")
eins|zwei
----+----
ping|pong
(1 row)

bash$ su                # Yow! Seems to work - now install it properly
bash# cp _pg.so /usr/lib/python1.5/lib-dynload 

done!

Oliver White (ojw@muzak.iinet.net.au) sent me the following information
about installing on Debian.

Hi, I thought you might want to upgrade your documentation for PyGreSQL
to let people know they can get it by simply typing 'apt-get install
python-pygresql', on debian (duh). This would have saved me a lot of
trouble.