MSVC build fixes.

This commit is contained in:
Federico Di Gregorio 2006-02-11 06:51:38 +00:00
parent 7f09080ba2
commit 8db642945c
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2006-02-11 Federico Di Gregorio <fog@initd.org>
* setup.py: Applied patch from lbruno.
2006-01-11 Federico Di Gregorio <fog@initd.org> 2006-01-11 Federico Di Gregorio <fog@initd.org>
* setup.py: does not report an error in pg_config unless the pg_config * setup.py: does not report an error in pg_config unless the pg_config

View File

@ -123,7 +123,14 @@ class psycopg_build_ext(build_ext):
self.libraries.append("ws2_32") self.libraries.append("ws2_32")
self.libraries.append("advapi32") self.libraries.append("advapi32")
if self.get_compiler() == "msvc": if self.get_compiler() == "msvc":
# MSVC requires an explicit "libpq"
self.libraries.remove("pq")
self.libraries.append("libpq")
self.libraries.append("shfolder") 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): def finalize_darwin(self):
"""Finalize build system configuration on darwin platform.""" """Finalize build system configuration on darwin platform."""