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"))