blob: 20451e7feb334983d6ee2fe1296f2aa8106c1d21 [file] [log] [blame] [edit]
diff -Naur PyQt-builder-1.4.0-orig/pyqtbuild/builder.py PyQt-builder-1.4.0/pyqtbuild/builder.py
--- PyQt-builder-1.4.0-orig/pyqtbuild/builder.py 2020-05-31 14:52:54.000000000 +0300
+++ PyQt-builder-1.4.0/pyqtbuild/builder.py 2020-06-07 21:33:19.550266500 +0300
@@ -26,6 +26,7 @@
import os
import sys
+from sysconfig import _POSIX_BUILD
from sipbuild import (Buildable, BuildableModule, Builder, Option, Project,
PyProjectOptionException, UserException)
@@ -58,7 +59,7 @@
# be on PATH).
if tool != 'pep517':
self._sip_distinfo = os.path.join(
- os.path.abspath(os.path.dirname(sys.argv[0])),
+ os.path.abspath(os.path.dirname(sys.argv[0]).replace('\\', '/')),
self._sip_distinfo)
# Check we have a qmake.
@@ -175,8 +175,12 @@
['install_' + installable.name
for installable in project.installables])))
pro_lines.append('distinfo.extra = {}'.format(' '.join(args)))
+ if self.project.py_platform == 'win32' and "MSYSTEM" in os.environ:
+ distinfo_dir = os.popen(' '.join(['cygpath', '--unix', target_dir])).readline().strip()
+ else:
+ distinfo_dir = target_dir
pro_lines.append(
- 'distinfo.path = {}'.format(self.qmake_quote(target_dir)))
+ 'distinfo.path = {}'.format(self.qmake_quote(distinfo_dir)))
pro_lines.append('INSTALLS += distinfo')
pro_name = os.path.join(project.build_dir, project.name + '.pro')
@@ -266,7 +267,7 @@
def _find_make(self):
""" Return the name of a valid make program. """
- if self.project.py_platform == 'win32':
+ if self.project.py_platform == 'win32' and not "MSYSTEM" in os.environ:
if self.spec == 'win32-g++':
make = 'mingw32-make'
else:
@@ -388,8 +389,8 @@
# TODO: is this still necessary for Python v3.8?
if not buildable.static:
pro_lines.extend(['win32 {',
- ' LIBS += -L{}'.format(
- self.qmake_quote(project.py_pylib_dir)),
+ ' LIBS += -L{} -l{}'.format(
+ self.qmake_quote(project.py_pylib_dir), self.qmake_quote(project.py_pylib_lib)),
'}'])
# Add any installables from the buildable.
@@ -419,7 +420,11 @@
raise UserException(
"Unexpected output from qmake: '{0}'".format(line))
- name, value = tokens
+ if _POSIX_BUILD and "MSYSTEM" in os.environ:
+ name = tokens[0]
+ value = os.popen(' '.join(['cygpath', '--unix', tokens[1]])).readline().strip()
+ else:
+ name, value = tokens
else:
name = tokens
value = None
diff -Naur PyQt-builder-1.4.0-orig/pyqtbuild/project.py PyQt-builder-1.4.0/pyqtbuild/project.py
--- PyQt-builder-1.4.0-orig/pyqtbuild/project.py 2020-05-31 14:52:54.000000000 +0300
+++ PyQt-builder-1.4.0/pyqtbuild/project.py 2020-06-07 21:31:10.233125300 +0300
@@ -26,6 +26,7 @@
import os
import sys
+from sysconfig import _POSIX_BUILD
from sipbuild import Option, Project
@@ -88,7 +89,7 @@
# Get the details of the default Python interpreter library. Note that
# these are actually non-user options but we need the 'link_full_dll'
# user option in order to set them.
- if self.py_platform == 'win32':
+ if self.py_platform == 'win32' and not _POSIX_BUILD:
pylib_dir = os.path.join(sys.base_prefix, 'libs')
debug_suffix = '_d' if self.py_debug else ''