110 lines
5.1 KiB
Diff
110 lines
5.1 KiB
Diff
--- PyQt5_gpl-5.9/configure.py.orig 2017-08-22 15:11:51.878439200 +0200
|
|
+++ PyQt5_gpl-5.9/configure.py 2017-08-22 15:15:44.292242200 +0200
|
|
@@ -25,6 +25,7 @@
|
|
import shutil
|
|
import stat
|
|
import sys
|
|
+from sysconfig import _POSIX_BUILD
|
|
|
|
|
|
# Initialise the constants.
|
|
@@ -414,7 +415,7 @@
|
|
self.module_dir = sysconfig.get_python_lib(plat_specific=1)
|
|
self.debug = hasattr(sys, 'gettotalrefcount')
|
|
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
bin_dir = sys.exec_prefix
|
|
|
|
try:
|
|
@@ -443,6 +444,13 @@
|
|
self.data_dir = sys.prefix + '/share'
|
|
self.lib_dir = sys.prefix + '/lib'
|
|
|
|
+ if _POSIX_BUILD and "MSYSTEM" in os.environ:
|
|
+ self.inc_dir = os.popen(' '.join(['cygpath', '--unix', self.inc_dir])).readline().strip()
|
|
+ self.module_dir = os.popen(' '.join(['cygpath', '--unix', self.module_dir])).readline().strip()
|
|
+ self.bin_dir = os.popen(' '.join(['cygpath', '--unix', self.bin_dir])).readline().strip()
|
|
+ self.data_dir = os.popen(' '.join(['cygpath', '--unix', self.data_dir])).readline().strip()
|
|
+ self.lib_dir = os.popen(' '.join(['cygpath', '--unix', self.lib_dir])).readline().strip()
|
|
+
|
|
# The name of the interpreter used by the pyuic5 wrapper.
|
|
if sys.platform == 'darwin':
|
|
# The installation of MacOS's python is a mess that changes from
|
|
@@ -638,7 +646,7 @@
|
|
py_major = self.py_version >> 16
|
|
py_minor = (self.py_version >> 8) & 0x0ff
|
|
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
debug_suffix = self.get_win32_debug_suffix()
|
|
|
|
# See if we are using the limited API.
|
|
@@ -756,6 +764,9 @@
|
|
|
|
self.designer_plugin_dir = qt_config.QT_INSTALL_PLUGINS + '/designer'
|
|
self.qml_plugin_dir = qt_config.QT_INSTALL_PLUGINS + '/PyQt5'
|
|
+ if "MSYSTEM" in os.environ:
|
|
+ self.designer_plugin_dir = os.popen(' '.join(['cygpath', '--unix', self.designer_plugin_dir])).readline().strip()
|
|
+ self.qml_plugin_dir = os.popen(' '.join(['cygpath', '--unix', self.qml_plugin_dir])).readline().strip()
|
|
|
|
if self.sysroot == '':
|
|
self.sysroot = qt_config.QT_SYSROOT
|
|
@@ -764,6 +775,8 @@
|
|
# in the default location.
|
|
self.qsci_api_dir = os.path.join(qt_config.QT_INSTALL_DATA, 'qsci')
|
|
self.qsci_api = os.path.isdir(self.qsci_api_dir)
|
|
+ if "MSYSTEM" in os.environ:
|
|
+ self.qsci_api_dir = os.popen(' '.join(['cygpath', '--unix', self.qsci_api_dir])).readline().strip()
|
|
|
|
# Save the default qmake spec. and finalise the value we want to use.
|
|
self.qmake_spec_default = qt_config.QMAKE_SPEC
|
|
@@ -771,7 +784,9 @@
|
|
# On Windows for Qt versions prior to v5.9.0 we need to be explicit
|
|
# about the qmake spec.
|
|
if self.qt_version < 0x050900 and self.py_platform == 'win32':
|
|
- if self.py_version >= 0x030500:
|
|
+ if _POSIX_BUILD:
|
|
+ self.qmake_spec = "win32-g++"
|
|
+ elif self.py_version >= 0x030500:
|
|
self.qmake_spec = 'win32-msvc2015'
|
|
elif self.py_version >= 0x030300:
|
|
self.qmake_spec = 'win32-msvc2010'
|
|
@@ -952,6 +967,15 @@
|
|
if opts.vendlibdir is not None:
|
|
self.vend_lib_dir = opts.vendlibdir
|
|
|
|
+ if _POSIX_BUILD and "MSYSTEM" in os.environ:
|
|
+ self.pyqt_bin_dir = os.popen(' '.join(['cygpath', '--unix', self.pyqt_bin_dir])).readline().strip()
|
|
+ self.designer_plugin_dir = os.popen(' '.join(['cygpath', '--unix', self.designer_plugin_dir])).readline().strip()
|
|
+ self.pyqt_module_dir = os.popen(' '.join(['cygpath', '--unix', self.pyqt_module_dir])).readline().strip()
|
|
+ self.qsci_api_dir = os.popen(' '.join(['cygpath', '--unix', self.qsci_api_dir])).readline().strip()
|
|
+ self.pyqt_sip_dir = os.popen(' '.join(['cygpath', '--unix', self.pyqt_sip_dir])).readline().strip()
|
|
+ self.vend_inc_dir = os.popen(' '.join(['cygpath', '--unix', self.vend_inc_dir])).readline().strip()
|
|
+ self.vend_lib_dir = os.popen(' '.join(['cygpath', '--unix', self.vend_lib_dir])).readline().strip()
|
|
+
|
|
# Handle any conflicts.
|
|
if not self.qt_shared:
|
|
if not self.static:
|
|
@@ -1015,7 +1015,7 @@
|
|
# it where it is.
|
|
if not self.static:
|
|
pro_lines.extend(['win32 {',
|
|
- ' LIBS += ' + self.get_pylib_link_arguments(name=False),
|
|
+ ' LIBS += ' + self.get_pylib_link_arguments(name=True),
|
|
'}'])
|
|
|
|
@staticmethod
|
|
@@ -2312,7 +2336,10 @@
|
|
|
|
# Create the output file, first making sure it doesn't exist.
|
|
remove_file(out_file)
|
|
- run_command(test + ' ' + out_file, verbose)
|
|
+ if "MSYSTEM" in os.environ:
|
|
+ run_command('sh -c "'+test + ' ' + out_file + '"', True)
|
|
+ else:
|
|
+ run_command(test + ' ' + out_file, True)
|
|
|
|
if not os.access(out_file, os.F_OK):
|
|
error("%s failed to create %s. Make sure your Qt installation is correct." % (test, out_file))
|