66 lines
2.8 KiB
Diff
66 lines
2.8 KiB
Diff
--- a/pyqtbuild/builder.py
|
|
+++ b/pyqtbuild/builder.py
|
|
@@ -39,7 +39,7 @@
|
|
exe_dir, exe_name = os.path.split(sys.argv[0])
|
|
|
|
if exe_name.startswith('sip-'):
|
|
- self._sip_distinfo = os.path.join(os.path.abspath(exe_dir),
|
|
+ self._sip_distinfo = os.path.join(os.path.abspath(exe_dir.replace('\\', '/')),
|
|
self._sip_distinfo)
|
|
|
|
# Check we have a qmake.
|
|
@@ -233,8 +233,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')
|
|
@@ -461,8 +465,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.
|
|
@@ -493,6 +497,8 @@
|
|
"Unexpected output from qmake: '{0}'".format(line))
|
|
|
|
name, value = tokens
|
|
+ if "MSYSTEM" in os.environ and value != "":
|
|
+ value = os.popen(' '.join(['cygpath', '--unix', value])).readline().strip()
|
|
else:
|
|
name = tokens
|
|
value = None
|
|
@@ -627,7 +633,7 @@
|
|
|
|
if install:
|
|
args.append('install')
|
|
- elif project.py_platform != 'win32' and self.jobs:
|
|
+ elif args[0] == 'make' and self.jobs:
|
|
args.append('-j')
|
|
args.append(str(self.jobs))
|
|
|
|
--- a/pyqtbuild/project.py
|
|
+++ b/pyqtbuild/project.py
|
|
@@ -56,7 +56,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 'MSC' in sys.version:
|
|
pylib_dir = os.path.join(sys.base_prefix, 'libs')
|
|
|
|
debug_suffix = '_d' if self.py_debug else ''
|