diff --git a/ChangeLog b/ChangeLog index de836c0f..b759cd39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-11 Federico Di Gregorio + + * setup.py: Applied patch from lbruno. + 2006-01-11 Federico Di Gregorio * setup.py: does not report an error in pg_config unless the pg_config diff --git a/setup.py b/setup.py index bb0959f8..93906a9e 100644 --- a/setup.py +++ b/setup.py @@ -123,8 +123,15 @@ class psycopg_build_ext(build_ext): self.libraries.append("ws2_32") self.libraries.append("advapi32") if self.get_compiler() == "msvc": + # MSVC requires an explicit "libpq" + self.libraries.remove("pq") + self.libraries.append("libpq") self.libraries.append("shfolder") - + for path in self.library_dirs: + if os.path.isfile(os.path.join(path, "ms", "libpq.lib")): + self.library_dirs.append(os.path.join(path, "ms")) + break + def finalize_darwin(self): """Finalize build system configuration on darwin platform.""" self.libraries.append('ssl')