blob: a0960bc7aa80fea2d512ea6fbe3ed97a517216b7 [file] [log] [blame]
diff -Naur sip-5.3.0-orig/sipbuild/buildable.py sip-5.3.0/sipbuild/buildable.py
--- sip-5.3.0-orig/sipbuild/buildable.py 2020-05-31 14:51:51.000000000 +0300
+++ sip-5.3.0/sipbuild/buildable.py 2020-06-07 21:02:20.486145600 +0300
@@ -24,6 +24,7 @@
import importlib
import os
import sys
+from distutils.sysconfig import get_config_var
from .exceptions import UserException
from .installable import Installable
@@ -147,7 +148,12 @@
""" Return the filename extension that a module should have. """
if sys.platform == 'win32':
- return '.pyd'
+ plugin_ext = get_config_var('EXT_SUFFIX')
+ if not plugin_ext:
+ plugin_ext = get_config_var('SO')
+ if not plugin_ext:
+ plugin_ext = '.pyd'
+ return plugin_ext
suffixes = importlib.machinery.EXTENSION_SUFFIXES
diff -Naur sip-5.3.0-orig/sipbuild/installable.py sip-5.3.0/sipbuild/installable.py
--- sip-5.3.0-orig/sipbuild/installable.py 2020-05-31 14:51:51.000000000 +0300
+++ sip-5.3.0/sipbuild/installable.py 2020-06-07 20:56:16.487690200 +0300
@@ -22,6 +22,7 @@
import os
+import sys
from shutil import copy2, copytree
@@ -49,6 +49,9 @@
target_dir = self.target_subdir
else:
target_dir = os.path.join(target_dir, self.target_subdir)
+
+ if sys.platform == 'win32' and "MSYSTEM" in os.environ:
+ target_dir = os.popen(' '.join(['cygpath', '--unix', target_dir])).readline().strip()
return target_dir
diff -Naur sip-5.3.0-orig/sipbuild/distinfo/distinfo.py sip-5.3.0/sipbuild/distinfo/distinfo.py
--- sip-5.3.0-orig/sipbuild/distinfo/distinfo.py 2020-05-31 14:51:51.000000000 +0300
+++ sip-5.3.0/sipbuild/distinfo/distinfo.py 2020-06-11 08:45:35.091288700 +0300
@@ -79,6 +79,8 @@
generator = os.path.basename(sys.argv[0])
# The prefix directory corresponds to DESTDIR or INSTALL_ROOT.
+ if sys.platform == 'win32' and "MSYSTEM" in os.environ:
+ distinfo_dir = os.popen(' '.join(['cygpath', '--unix', distinfo_dir])).readline().strip()
real_distinfo_dir = prefix_dir + distinfo_dir
# Make sure we have an empty dist-info directory. Handle exceptions as the