From a595830f5ea5ed49412d8c9c988539a43c336896 Mon Sep 17 00:00:00 2001 From: Giorgos Tzampanakis Date: Wed, 22 Sep 2021 15:56:46 +0300 Subject: [PATCH] Add pg_config libdir to the library's rpath Close #1356. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8137ef630..507bfe5c0 100644 --- a/setup.py +++ b/setup.py @@ -372,7 +372,9 @@ def finalize_options(self): self.libraries.append("pq") try: - self.library_dirs.append(pg_config_helper.query("libdir")) + pg_config_libdir = pg_config_helper.query("libdir") + self.library_dirs.append(pg_config_libdir) + self.rpath.append(pg_config_libdir) self.include_dirs.append(pg_config_helper.query("includedir")) self.include_dirs.append(pg_config_helper.query("includedir-server"))