Re: Python (PyGreSQL) make install patch - Mailing list pgsql-patches
From | Jason Tishler |
---|---|
Subject | Re: Python (PyGreSQL) make install patch |
Date | |
Msg-id | 20010529145900.G498@dothill.com Whole thread Raw |
In response to | Re: Python (PyGreSQL) make install patch (Peter Eisentraut <peter_e@gmx.net>) |
Responses |
Re: Python (PyGreSQL) make install patch
|
List | pgsql-patches |
Peter, On Fri, May 25, 2001 at 05:31:20PM +0200, Peter Eisentraut wrote: > Jason Tishler writes: > > > Rip out the python makefile and reimplement the build yourself. ;-) > > > > Did you say rip? See attached for a patch that converts from using the > > traditional Makefile.pre.in style of building Python extensions to the > > newer Distutils style. This patch is *not* final -- its more of a proof > > of concept to see if such a patch would be accepted when finished. > > I don't think this does anything in the way of fixing the outlined > problems. Agreed, but I was hoping that it would set the stag to facilitate correcting the problems with the existing version: 1. VPATH support: I was hoping that Distutils supports VPATH. Unfortunately, my research (i.e, web searching, Python doc reading, Distutils code grep-ing) came up empty which leads me to the conclude that VPATH is not (currently) supported. However, the setup.py that is part of the Python build *does* support configuring and building in a tree that is different than the source tree. If this is the required (VPATH) functionality, then we can steal this from the Python build. 2. Installation by a non-root user: I don't know how to solve this with Makefiles. The only workaround I can think of is to install in a non-privileged directory and inform the user to set their PYTHONPATH appropriately. BTW, won't non-root users have problems installing PostgreSQL in the standard directory too? 3. Different PostgreSQL and Python prefixes: I feel that this issue can be resolve regardless of the way this patch goes by capturing the Python prefix during configure and using it during make install. I'm still quite willing to do this work. > Moreover, it won't work with Python <2.x. The above is not quite correct -- Python 1.6 or later supports Distutils. One can also download and install Distutils for Python 1.5.2 or earlier from: http://www.python.org/sigs/distutils-sig/download.html > What I meant with "rip" was to get rid of all the makefile generating > tools and write our own makefile. I knew what you meant, but from my experiences enhancing Cygwin Python to support shared extensions, I can attest that Makefile.pre.in, makesetup, etc. is *not* a fun place to be. Can you spell M-E-T-A! :,) Sorry, but I won't go there again. IMO, it makes much more sense to leverage off of the Distutils effort -- especially now that the standard Python extension modules are built this way too. > > My patch also has the follow issues/changes: > > > > 1. pg.py is installed in $(prefix)/lib/python2.1/site-packages instead of > > $(prefix)/lib/python2.1. I believe this to be more correct or at least > > this what Distutils tries to do. > > I think if you build locally from source you want site-packages and if you > make a binary distribution that is considered part of the OS core then you > don't. Probably go for the former by default. I am certainly not a Python expert, but my impression is that $(prefix)/lib/python2.1 is reserved for Python itself. I can research this one too, but I still think that the PostgreSQL modules should go in $(prefix)/lib/python2.1/site-packages. > > 2. pgdb.py is also installed (as done by the original setup.py). > > Oops. I will make sure that pgdb.py is not forgotten in the final version. > > 3. The new setup.py doesn't handle Win32 yet (like the original one sort > > of did). > > Not sure whether we are expected to care. Good. I wasn't really willing to expend effort on Win32 and was only going to do so if it was deemed a requirement. So which way do I proceed? Should I continue with the Distutils version or just fix the current scheme to handle different PostgreSQL and Python prefixes and install pgdb.py? Thanks, Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
pgsql-patches by date: