X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9EF16476459 for ; Wed, 14 May 2003 15:24:46 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 39768-05 for ; Wed, 14 May 2003 15:24:45 -0400 (EDT) Received: from ll.mit.edu (LLMAIL.LL.MIT.EDU [129.55.12.40]) by postgresql.org (Postfix) with ESMTP id 45C38476455 for ; Wed, 14 May 2003 15:24:44 -0400 (EDT) Received: (from smtp@localhost) by ll.mit.edu (8.12.9/8.8.8) id h4EJOhKg000701 for ; Wed, 14 May 2003 15:24:43 -0400 (EDT) Received: from sty.llan.ll.mit.edu( ), claiming to be "sty.llan" via SMTP by llpost, id smtpdAAA_qay7a; Wed May 14 15:24:32 2003 Date: Wed, 14 May 2003 15:24:32 -0400 From: george young To: pgsql-interfaces@postgresql.org Subject: pygresql build/install problems: use setup.py? Message-Id: <20030514152432.3097dd89.gry@ll.mit.edu> Reply-To: gry@ll.mit.edu Organization: MIT Lincoln Laboratory X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/33 X-Sequence-Number: 4151 [python 2.3a1 & 2.2, postgresql 7.3.2 & 7.2.1, x86 linux] As you note from the above line, I'm wrangling multiple versions of python and postgres[ql]. I use the PyGreSQL interface from the postgres source dist. But I need to install PyGreSQL for other than the default python. I know I could hack it by hand, but it seems like there could be an optional arg to configure like: ./configure --with-python=python2.3 to specify a binary (and include files and lib install destination) other than the default. Maybe it needs a separate option: --python-include=/usr/local/include/python-2.3 I'm hoping some autoconf wiz will take this in hand -- auto* stuff scares me... I succeeded by fixing up setup.py: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv --- setup.py~ Tue Mar 19 08:21:14 2002 +++ setup.py Wed May 14 15:10:30 2003 @@ -30,8 +30,8 @@ optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ] data_files = [ 'libpq.dll' ] else: - include_dirs=['/usr/include/pgsql'] - library_dirs=['usr/lib/pgsql'] + include_dirs=['../../include','../libpq','/usr/include/pgsql'] + library_dirs=['../libpq','/usr/lib/pgsql'] optional_libs=['pq'] data_files = [] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Isn't this the right thing to do? It should use the .. lib and include dirs if they exist, since these are sure to be correct, as opposed to hard coded /usr/lib/pgsql and /usr/include/pgsql which might not exist until an install has been done, and worse, might be from an older postgres version. It seems like the makefiles should just run $PYTHON setup.py build and $PYTHON setup.py install since setup.py has a much better chance of installing in the right directories, or am I missing something? -- I cannot think why the whole bed of the ocean is not one solid mass of oysters, so prolific they seem. Ah, I am wandering! Strange how the brain controls the brain! -- Sherlock Holmes in "The Dying Detective"