mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Allow to specify --static-libpq on setup.py command line
Patch provided by Matthew Ryan (ticket #48).
This commit is contained in:
parent
90536a187d
commit
7716cc6a0c
2
NEWS
2
NEWS
|
@ -4,6 +4,8 @@ What's new in psycopg 2.4.1
|
||||||
- Use own parser for bytea output, not requiring anymore the libpq 9.0
|
- Use own parser for bytea output, not requiring anymore the libpq 9.0
|
||||||
to parse the hex format.
|
to parse the hex format.
|
||||||
- Correctly detect an empty query sent to the backend (ticket #46).
|
- Correctly detect an empty query sent to the backend (ticket #46).
|
||||||
|
- Allow to specify --static-libpq on setup.py command line instead of
|
||||||
|
just in 'setup.cfg'. Patch provided by Matthew Ryan (ticket #48).
|
||||||
|
|
||||||
|
|
||||||
What's new in psycopg 2.4
|
What's new in psycopg 2.4
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -133,6 +133,7 @@ class psycopg_build_ext(build_ext):
|
||||||
self.mx_include_dir = None
|
self.mx_include_dir = None
|
||||||
self.use_pydatetime = 1
|
self.use_pydatetime = 1
|
||||||
self.have_ssl = have_ssl
|
self.have_ssl = have_ssl
|
||||||
|
self.static_libpq = static_libpq
|
||||||
self.pg_config = None
|
self.pg_config = None
|
||||||
|
|
||||||
def get_compiler(self):
|
def get_compiler(self):
|
||||||
|
@ -263,7 +264,7 @@ or with the pg_config option in 'setup.cfg'.
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
self.include_dirs.append(".")
|
self.include_dirs.append(".")
|
||||||
if static_libpq:
|
if self.static_libpq:
|
||||||
if not self.link_objects: self.link_objects = []
|
if not self.link_objects: self.link_objects = []
|
||||||
self.link_objects.append(
|
self.link_objects.append(
|
||||||
os.path.join(self.get_pg_config("libdir"), "libpq.a"))
|
os.path.join(self.get_pg_config("libdir"), "libpq.a"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user