Blob Blame History Raw
diff -rupN PyQt5_gpl-5.9/configure.py PyQt5_gpl-5.9-new/configure.py
--- PyQt5_gpl-5.9/configure.py	2017-07-03 18:25:14.000000000 +0200
+++ PyQt5_gpl-5.9-new/configure.py	2017-07-12 23:10:17.071698512 +0200
@@ -473,19 +473,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.
@@ -625,7 +626,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.
@@ -636,7 +637,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
 
@@ -1316,8 +1317,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):
@@ -1918,11 +1919,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'
@@ -2188,6 +2189,12 @@ def compile_test_program(target_config,
     configuration.
     """
 
+    host_config = TargetConfiguration()
+    host_config.qmake = "qmake-qt5"
+    host_config.qmake_spec = "linux-g++"
+    host_config.py_platform = "linux"
+    host_config.qmake_variables = ""
+
     metadata = MODULE_METADATA[mname]
 
     # The derived file names.
@@ -2206,7 +2213,7 @@ 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)
     pro_lines.append('SOURCES = %s' % name_source)
 
@@ -2214,10 +2221,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):
@@ -2295,7 +2302,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'