Skip to content

Commit 99262a2

Browse files
author
Giorgos Tzampanakis
committed
Add pg_config libdir to the library's rpath
Close #1356.
1 parent 3430dcd commit 99262a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
version_flags = ['dt', 'dec']
7575

7676
PLATFORM_IS_WINDOWS = sys.platform.lower().startswith('win')
77+
PLATFORM_IS_LINUX = sys.platform.lower().startswith('linux')
7778

7879

7980
class PostgresConfig:
@@ -372,7 +373,10 @@ def finalize_options(self):
372373
self.libraries.append("pq")
373374

374375
try:
375-
self.library_dirs.append(pg_config_helper.query("libdir"))
376+
pg_config_libdir = pg_config_helper.query("libdir")
377+
self.library_dirs.append(pg_config_libdir)
378+
if PLATFORM_IS_LINUX:
379+
self.rpath.append(pg_config_libdir)
376380
self.include_dirs.append(pg_config_helper.query("includedir"))
377381
self.include_dirs.append(pg_config_helper.query("includedir-server"))
378382

0 commit comments

Comments
 (0)