102 lines
4.7 KiB
Diff
102 lines
4.7 KiB
Diff
--- PyQt5_gpl-5.6.orig/configure.py 2016-04-24 11:55:08.000000000 +0100
|
|
+++ PyQt5_gpl-5.6/configure.py 2016-07-19 14:09:00.230550900 +0100
|
|
@@ -25,6 +25,7 @@
|
|
import shutil
|
|
import stat
|
|
import sys
|
|
+from sysconfig import _POSIX_BUILD
|
|
|
|
|
|
# Initialise the constants.
|
|
@@ -400,7 +401,7 @@
|
|
self.venv_inc_dir = sysconfig.get_python_inc(prefix=sys.prefix)
|
|
self.module_dir = sysconfig.get_python_lib(plat_specific=1)
|
|
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
self.bin_dir = sys.exec_prefix
|
|
self.data_dir = sys.prefix
|
|
self.lib_dir = sys.prefix + '\\libs'
|
|
@@ -409,6 +410,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
|
|
@@ -481,7 +489,9 @@
|
|
|
|
# The qmake spec we want to use.
|
|
if 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'
|
|
@@ -702,7 +712,10 @@
|
|
|
|
# Create the output file, first making sure it doesn't exist.
|
|
remove_file(out_file)
|
|
- run_command(cmd, verbose)
|
|
+ if "MSYSTEM" in os.environ:
|
|
+ run_command("sh -c "+cmd, verbose)
|
|
+ else:
|
|
+ run_command(cmd, verbose)
|
|
|
|
if not os.access(out_file, os.F_OK):
|
|
error("%s failed to create %s. Make sure your Qt installation is correct." % (cmd, out_file))
|
|
@@ -731,7 +744,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.
|
|
@@ -803,6 +816,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
|
|
@@ -811,7 +827,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.default_qmake_spec = qt_config.QMAKE_SPEC
|
|
|
|
@@ -959,6 +976,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:
|