X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A6C4747659A for ; Thu, 15 May 2003 04:27:43 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 54817-09 for ; Thu, 15 May 2003 04:27:41 -0400 (EDT) Received: from mail.w-koerting.de (mail.w-koerting.de [213.133.109.52]) by postgresql.org (Postfix) with ESMTP id 63E5A476227 for ; Thu, 15 May 2003 04:27:41 -0400 (EDT) Received: from thea.w-koerting.de (localhost [127.0.0.1]) by mail.w-koerting.de (Postfix) with ESMTP id 31BD224802E for ; Thu, 15 May 2003 10:27:41 +0200 (CEST) Received: from ghaering.de (pD9E4DA84.dip.t-dialin.net [217.228.218.132]) by thea.w-koerting.de (tmda-ofmipd) with ESMTP; Thu, 15 May 2003 10:27:39 +0200 (CEST) Message-ID: <3EC34F90.5060804@ghaering.de> Date: Thu, 15 May 2003 10:28:00 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: pygresql build/install problems: use setup.py? References: <20030514152432.3097dd89.gry@ll.mit.edu> In-Reply-To: <20030514152432.3097dd89.gry@ll.mit.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Gerhard_H=E4ring?= X-Delivery-Agent: TMDA/0.76 (Middleground) X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/34 X-Sequence-Number: 4152 george young wrote: > [...] 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's the right thing to do. And it is also what it does in the win32 case. And pyPgSQL does the same as well on win32, because it's setup.py evolved from the PyGreSQL one :-) > 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? That's a feasible approach. But the PostgreSQL developers probably aren't very familiar with distutils. Also distutils doesn't support cross-compiling, which the auto* build process for PostgreSQL might support otherwise. -- Gerhard