psycopg2 doesn't use LDFLAGS from pg_config - Mailing list psycopg

From Audrius Kažukauskas
Subject psycopg2 doesn't use LDFLAGS from pg_config
Date
Msg-id 20130930175654.GA16357@varna
Whole thread Raw
Responses Re: psycopg2 doesn't use LDFLAGS from pg_config
List psycopg
Hi,

I'd like to ask for a reason why psycopg2 doesn't use LDFLAGS from
pg_config?  Recently I upgraded to PostgreSQL 9.3.0 on a Slackware
system.  The build script's author decided to move Pg libraries to a
non-standard place (/usr/lib/postgresql/$VERSION/lib), so that multiple
versions of Pg could be installed.  Now, psycopg2 builds correctly after
this change, but it fails to find libpq.so at import time:

  ImportError: libpq.so.5: cannot open shared object file: No such file
  or directory

The fix is to build psycopg2 with LDFLAGS="$(pg_config --ldflags)".

Are there any reasons for not using --ldflags value in setup.py?  If no,
would it be hard to add?

--
Audrius Kažukauskas
http://neutrino.lt/

Attachment

psycopg by date:

Previous
From: David Blewett
Date:
Subject: Re: copy_from and rowcount
Next
From: "W. Matthew Wilson"
Date:
Subject: Is passing a list as a bound variable safe from SQL injection?