diff -rupN PyQt5_gpl-5.10.1/configure.py PyQt5_gpl-5.10.1-new/configure.py
--- PyQt5_gpl-5.10.1/configure.py 2018-02-27 10:44:10.000000000 +0100
+++ PyQt5_gpl-5.10.1-new/configure.py 2019-01-21 13:06:04.732455168 +0100
@@ -499,19 +499,20 @@ class TargetConfiguration:
def __init__(self):
""" Initialise the configuration with default values. """
+ prefix = os.environ["PREFIX"]
# Values based on the host Python configuration.
py_config = HostPythonConfiguration()
self.py_debug = py_config.debug
- self.py_inc_dir = py_config.inc_dir
- self.py_venv_inc_dir = py_config.venv_inc_dir
- self.py_lib_dir = py_config.lib_dir
- self.py_platform = py_config.platform
+ self.py_inc_dir = os.path.join(prefix, 'include/python2.7/')
+ self.py_venv_inc_dir = os.path.join(prefix, 'include/python2.7/')
+ self.py_lib_dir = os.path.join(prefix, 'lib')
+ self.py_platform = 'win32-g++'
self.py_version = py_config.version
- self.pyqt_bin_dir = py_config.bin_dir
- self.pyqt_module_dir = py_config.module_dir
- self.pyqt_stubs_dir = os.path.join(py_config.module_dir, 'PyQt5')
- self.pyqt_sip_dir = os.path.join(py_config.data_dir, 'sip', 'PyQt5')
+ self.pyqt_bin_dir = os.path.join(prefix, 'bin')
+ self.pyqt_module_dir = os.path.join(prefix, 'lib/python2.7/site-packages')
+ self.pyqt_stubs_dir = os.path.join(prefix, 'lib/python2.7/site-packages', 'PyQt5')
+ self.pyqt_sip_dir = os.path.join(prefix, 'share', 'sip', 'PyQt5')
self.pyuic_interpreter = py_config.pyuic_interpreter
# Remaining values.
@@ -638,7 +639,7 @@ class TargetConfiguration:
py_major = self.py_version >> 16
py_minor = (self.py_version >> 8) & 0x0ff
- if sys.platform == 'win32':
+ if True:
debug_suffix = self.get_win32_debug_suffix()
# See if we are using the limited API.
@@ -649,7 +650,7 @@ class TargetConfiguration:
if limited:
pylib_lib = 'python%d%s' % (py_major, debug_suffix)
else:
- pylib_lib = 'python%d%d%s' % (py_major, py_minor, debug_suffix)
+ pylib_lib = 'python%d.%d%s' % (py_major, py_minor, debug_suffix)
pylib_dir = self.py_lib_dir
@@ -991,7 +992,7 @@ class TargetConfiguration:
# 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
@@ -1382,8 +1383,8 @@ def check_5_1_modules(target_config, dis
'qsensor.h', 'new QSensor(QByteArray())')
check_module(target_config, disabled_modules, verbose, 'QtSerialPort',
'qserialport.h', 'new QSerialPort()')
- check_module(target_config, disabled_modules, verbose, 'QtX11Extras',
- 'QX11Info', 'QX11Info::display()')
+ #check_module(target_config, disabled_modules, verbose, 'QtX11Extras',
+ # 'QX11Info', 'QX11Info::display()')
def check_5_2_modules(target_config, disabled_modules, verbose):
@@ -1998,11 +1999,11 @@ def run_make(target_config, verbose, exe
# Guess the name of make and set the default target and platform specific
# name of the executable.
- if target_config.py_platform == 'win32':
- if target_config.qmake_spec == 'win32-g++':
- make = 'mingw32-make'
- else:
+ if target_config.py_platform.startswith('win32'):
+ if target_config.qmake_spec.startswith('win32-msvc'):
make = 'nmake'
+ else:
+ make = 'make'
if target_config.debug:
makefile_target = 'debug'
@@ -2266,6 +2267,15 @@ def compile_test_program(target_config,
configuration. uses_sip_h is set if the test program uses sip.h.
"""
+ host_config = TargetConfiguration()
+ host_config.qmake = "qmake-qt5"
+ host_config.qmake_spec = "linux-g++"
+ host_config.py_platform = "linux"
+ host_config.qmake_variables = ""
+ host_config.sip = "/usr/bin/sip"
+ host_config.sip_inc_dir = "/usr/include/python2.7/"
+ host_config.py_inc_dir = "/usr/include/python2.7/"
+
metadata = MODULE_METADATA[mname]
# The derived file names.
@@ -2284,11 +2294,11 @@ def compile_test_program(target_config,
# Create the .pro file.
pro_lines = []
- pro_add_qt_dependencies(target_config, metadata, pro_lines, debug)
+ pro_add_qt_dependencies(host_config, metadata, pro_lines, debug)
pro_lines.append('TARGET = %s' % name)
if uses_sip_h:
- target_config.add_sip_h_directives(pro_lines)
+ host_config.add_sip_h_directives(pro_lines)
pro_lines.append('SOURCES = %s' % name_source)
@@ -2296,10 +2306,10 @@ def compile_test_program(target_config,
f.write('\n'.join(pro_lines))
f.close()
- if not run_qmake(target_config, verbose, name_pro, name_makefile, fatal=False):
+ if not run_qmake(host_config, verbose, name_pro, name_makefile, fatal=False):
return None
- return run_make(target_config, verbose, name, name_makefile)
+ return run_make(host_config, verbose, name, name_makefile)
def run_test_program(mname, test, verbose):
@@ -2377,7 +2387,7 @@ def get_sip_flags(target_config):
sip_flags.append('-D')
# Handle the platform tag.
- if target_config.py_platform == 'win32':
+ if target_config.py_platform.startswith('win32'):
plattag = 'WS_WIN'
elif target_config.py_platform == 'darwin':
plattag = 'WS_MACX'