blob: afff06184f69d7017ede65fecab66110e08087f9 [file] [log] [blame]
--- QScintilla-2.11.4/Python/configure.py.orig 2020-06-08 08:33:31.457514700 +0300
+++ QScintilla-2.11.4/Python/configure.py 2020-06-08 08:41:26.542741300 +0300
@@ -34,6 +34,17 @@
from sysconfig import _POSIX_BUILD
+def get_module_ext():
+ plugin_ext = sysconfig.get_config_var('EXT_SUFFIX')
+ if not plugin_ext:
+ plugin_ext = sysconfig.get_config_var('SO')
+ if not plugin_ext:
+ if sys.platform == 'win32':
+ plugin_ext = '.pyd'
+ else:
+ plugin_ext = '.so'
+ return plugin_ext
+
###############################################################################
# You shouldn't need to modify anything above this line.
###############################################################################
@@ -1531,10 +1542,12 @@
pro.write('TARGET = %s\n' % mname)
+ module_ext = get_module_ext()
+
if not opts.static:
pro.write('''
win32 {
- PY_MODULE = %s.pyd
+ PY_MODULE = %s%s
PY_MODULE_SRC = $(DESTDIR_TARGET)
LIBS += -L%s -l%s
@@ -1560,17 +1572,17 @@
target.CONFIG = no_check_exist
target.files = $$PY_MODULE
-''' % (mname, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname))
+''' % (mname, module_ext, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname))
pro.write('''
target.path = %s
INSTALLS += target
''' % quote(target_config.module_dir))
- if sys.platform == 'win32':
- fs = '{}.lib' if opts.static else '{}.pyd'
+ if sys.platform == 'win32' and not _POSIX_BUILD:
+ fs = '{}.lib' if opts.static else ('{}' + module_ext)
else:
- fs = 'lib{}.a' if opts.static else '{}.so'
+ fs = 'lib{}.a' if opts.static else ('{}' + module_ext)
all_installs.append(target_config.module_dir + '/' + fs.format(mname))