Work around late initialization in distutils._msvccompiler.

This fixes Github issue #380.
This commit is contained in:
Christian Ullrich 2015-12-15 20:55:43 +01:00 committed by unknown
parent fe4cb0d493
commit e80bdc1bfd

View File

@ -301,6 +301,8 @@ class psycopg_build_ext(build_ext):
except AttributeError:
ext_path = os.path.join(self.build_lib,
'psycopg2', '_psycopg.pyd')
if not self.compiler.initialized:
self.compiler.initialize()
self.compiler.spawn(
['mt.exe', '-nologo', '-manifest',
os.path.join('psycopg', manifest),