summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristian Ullrich <chris@chrullrich.net>2016-01-06 15:04:33 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-03-10 12:12:19 +0000
commit654eeec24cc1ad63f84fcbf22a84994b9796a82e (patch)
tree3196465388a78bba0e95641df357a771fb7a9f21 /setup.py
parent1b7cebc41eb6a55b2cee0c09bd48da186360d330 (diff)
downloadpsycopg2-654eeec24cc1ad63f84fcbf22a84994b9796a82e.tar.gz
Work around late initialization in distutils._msvccompiler.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 570c5de..45e76bf 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),