From 654eeec24cc1ad63f84fcbf22a84994b9796a82e Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Wed, 6 Jan 2016 15:04:33 +0100 Subject: [PATCH 1/2] Work around late initialization in distutils._msvccompiler. --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 570c5def..45e76bf0 100644 --- a/setup.py +++ b/setup.py @@ -304,6 +304,10 @@ class psycopg_build_ext(build_ext): except AttributeError: ext_path = os.path.join(self.build_lib, 'psycopg2', '_psycopg.pyd') + # Make sure spawn() will work if compile() was never + # called. https://github.com/psycopg/psycopg2/issues/380 + if not self.compiler.initialized: + self.compiler.initialize() self.compiler.spawn( ['mt.exe', '-nologo', '-manifest', os.path.join('psycopg', manifest), From 48260c64063ba6d1d6045d57822c22d3378a832e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 8 Mar 2016 00:25:19 +0000 Subject: [PATCH 2/2] Py 3.5 MSVC 2015 build fixed noted in news Close issue #380. --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 8f085599..8a1b477b 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ What's new in psycopg 2.6.2 (:ticket:`#352`). - Fixed `!PersistentConnectionPool` on Python 3 (:ticket:`#348`). - Added support for setuptools/wheel (:ticket:`#370`). +- Fix build on Windows with Python 3.5, VS 2015 (:ticket:`#380`). - Fixed `!errorcodes.lookup` initialization thread-safety (:ticket:`#382`).