Postgresql & Python 2 - Mailing list pgsql-general

From Keith F Irwin
Subject Postgresql & Python 2
Date
Msg-id 995012908.19897.13.camel@c234192-a
Whole thread Raw
Responses Re: Postgresql & Python 2
Re: Postgresql & Python 2
List pgsql-general
Kind of an odd issue, I think....

I compiled the source rpm on my redhat 7.1 system and then installed the
resulting RPMS (including the python modules).  Worked.  No problems.

But redhat 7.1 comes stock with python 1.5.2.  For various reasons, I've
upgraded to Python 2.1, which DOESN'T replace python 1.5, but, rather,
installs the new version along side.  In other words:

    /usr/lib/python1.5
    /usr/lib/python2

The postgres drivers are in /usr/lib/python1.5/site-packages.

Let's suppose I want to delete python1.5.  If a reinstall the
posgres-python rpm, it'll put 'em back in /usr/lib/python1.5.  How do I
get them into the python2 directory?

I'm recompiling the rpms out of the source rpm (for posgres) as I write
this, but suddenly realize that it won't make any difference, as python
1.5 is used by too many system utilities to be excised from my system.
My guess was that the build process would detect the newer python, at
least of the old one was absent.)

SO, what's the best way to get the postgres modules into the python 2
hierarchy?  Just look at the RPM in question and copy 'em over, as in
copy the following files to the python2 hierarchy?

    /usr/lib/python1.5/site-packages/_pgmodule.so
    /usr/lib/python1.5/site-packages/pg.py
    /usr/lib/python1.5/site-packages/pgdb.py
    /usr/lib/python1.5/site-packages/setup.py

I'll try to get some code working doing this tomorrow night when I get
home from work, but I'm curious to know before hand if there are known
problems.

Thanks!

Keith


pgsql-general by date:

Previous
From: "Ben-Nes Michael"
Date:
Subject: Re: autoincrement???
Next
From: "Richard Huxton"
Date:
Subject: Re: \df+ and pg_proc query