Files
MINGW-packages/mingw-w64-distorm/001-detect-mingw-python.patch
2018-11-16 13:54:53 +03:00

33 lines
1.3 KiB
Diff

--- distorm-3.3.8/setup.py.orig 2018-11-16 13:39:57.421840000 +0300
+++ distorm-3.3.8/setup.py 2018-11-16 13:38:57.190134200 +0300
@@ -82,7 +82,7 @@
"""Customized build command"""
def run(self):
log.info('running custom_build')
- if 'windows' in platform.system().lower():
+ if 'windows' in platform.system().lower() and not 'GCC' in sys.version:
bits = 'win32' # x86 by default
# If x64 is specified in command line, change it here
for i in sys.argv:
@@ -225,8 +225,19 @@
ext_modules = None
libraries = None
package_data = []
if 'windows' in system:
- package_data = ['distorm3.dll']
+ if 'GCC' in sys.version:
+ libraries = [(
+ 'distorm3', dict(
+ package='distorm3',
+ sources=get_sources,
+ include_dirs=['src', 'include'],
+ extra_compile_args=['-fPIC', '-O2', '-Wall',
+ '-DSUPPORT_64BIT_OFFSET',
+ '-DDISTORM_STATIC',
+ '-Wl,--out-implib,libdistorm3.dll.a']))]
+ else:
+ package_data = ['distorm3.dll']
elif 'darwin' in system or 'macosx' in system:
libraries = [(
'distorm3', dict(