From: Daniele Varrazzo Date: Tue, 29 Jun 2021 11:47:43 +0000 (+0100) Subject: Add ws2_32 lib dependency on Windows X-Git-Tag: 3.0.dev0~4^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75b935fd31a19c84b001332b6c008fd1bbed0cc5;p=thirdparty%2Fpsycopg.git Add ws2_32 lib dependency on Windows --- diff --git a/psycopg_c/setup.py b/psycopg_c/setup.py index fed83b2bd..fb3163b84 100644 --- a/psycopg_c/setup.py +++ b/psycopg_c/setup.py @@ -64,6 +64,10 @@ class psycopg_build_ext(build_ext): if path: ext.library_dirs.append(path) + if sys.platform == "win32": + # For __imp_htons and others + ext.libraries.append("ws2_32") + if cythonize is not None: for ext in self.distribution.ext_modules: for i in range(len(ext.sources)):