mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Fix manifest insertion checks for MSVC py2.6/2.7
The manifest was never inserted because the checks were failing. Assuming build_extension was clearing out some of the checked values.
This commit is contained in:
parent
f2c0a01db1
commit
502d8e120e
14
setup.py
14
setup.py
|
@ -151,6 +151,14 @@ class psycopg_build_ext(build_ext):
|
|||
return get_pg_config(kind, self.pg_config)
|
||||
|
||||
def build_extension(self, ext):
|
||||
force_mt = False
|
||||
ext_path = self.get_ext_fullpath(ext.name)
|
||||
depends = list(ext.sources) + ext.depends
|
||||
|
||||
# Needs to be checked before build_extension
|
||||
if self.force or newer_group(depends, ext_path, 'newer'):
|
||||
force_mt = True
|
||||
|
||||
build_ext.build_extension(self, ext)
|
||||
|
||||
# For MSVC compiler and Python 2.6/2.7 (aka VS 2008), re-insert the
|
||||
|
@ -160,11 +168,7 @@ class psycopg_build_ext(build_ext):
|
|||
sysVer in ((2,6), (2,7)):
|
||||
sources = list(ext.sources)
|
||||
|
||||
ext_path = self.get_ext_fullpath(ext.name)
|
||||
depends = sources + ext.depends
|
||||
if not (self.force or newer_group(depends, ext_path, 'newer')):
|
||||
return
|
||||
|
||||
if force_mt:
|
||||
self.compiler.spawn(['mt.exe', '-nologo', '-manifest',
|
||||
os.path.join('psycopg', '_psycopg.vc9.manifest'),
|
||||
'-outputresource:%s;2' % (os.path.join(self.build_lib, 'psycopg2', '_psycopg.pyd'))])
|
||||
|
|
Loading…
Reference in New Issue
Block a user