mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Windows manifest changes based upon architecture
Apparently, using * for the architecture has the potential to not work on on some amd64 systems. Added checks and split the manifest based upon architecture.
This commit is contained in:
parent
da68119f7c
commit
560f52106c
15
psycopg/_psycopg.vc9.amd64.manifest
Normal file
15
psycopg/_psycopg.vc9.amd64.manifest
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
|
@ -9,7 +9,7 @@
|
|||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.vc90.CRT" version="9.0.21022.8" processorArchitecture="*" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
|
||||
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
8
setup.py
8
setup.py
|
@ -55,6 +55,7 @@ from distutils.command.build_ext import build_ext
|
|||
from distutils.sysconfig import get_python_inc
|
||||
from distutils.ccompiler import get_default_compiler
|
||||
from distutils.dep_util import newer_group
|
||||
from distutils.util import get_platform
|
||||
try:
|
||||
from distutils.command.build_py import build_py_2to3 as build_py
|
||||
except ImportError:
|
||||
|
@ -158,8 +159,13 @@ class psycopg_build_ext(build_ext):
|
|||
sysVer = sys.version_info[:2]
|
||||
if self.get_compiler().lower().startswith('msvc') and \
|
||||
sysVer in ((2,6), (2,7)):
|
||||
platform = get_platform()
|
||||
# Default to the x86 manifest
|
||||
manifest = '_psycopg.vc9.x86.manifest'
|
||||
if platform == 'win-amd64':
|
||||
manifest = '_psycopg.vc9.amd64.manifest'
|
||||
self.compiler.spawn(['mt.exe', '-nologo', '-manifest',
|
||||
os.path.join('psycopg', '_psycopg.vc9.manifest'),
|
||||
os.path.join('psycopg', manifest),
|
||||
'-outputresource:%s;2' % (os.path.join(self.build_lib, 'psycopg2', '_psycopg.pyd'))])
|
||||
|
||||
def finalize_win32(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user