Skip site navigation (1) Skip section navigation (2)

Re: pygresql build/install problems: use setup.py?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: gry(at)ll(dot)mit(dot)edu
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: pygresql build/install problems: use setup.py?
Date: 2003-06-12 02:15:26
Message-ID: 200306120215.h5C2FQ102229@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-patches
I have applied the setup.py part of this patch.  Thanks.

---------------------------------------------------------------------------

george young wrote:
> [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"
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/docs/faqs/FAQ.html
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2003-06-12 02:33:07
Subject: Re: Nested transactions: deferred triggers
Previous:From: Bruce MomjianDate: 2003-06-12 02:13:14
Subject: Re: CIDR addresses in pg_hba.conf

pgsql-interfaces by date

Next:From: Rudy LippanDate: 2003-06-12 13:53:05
Subject: Re: Announce: DBD::Pg 1.30_2 (beta)
Previous:From: David WheelerDate: 2003-06-11 01:21:13
Subject: Re: Announce: DBD::Pg 1.30_2 (beta)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group