configure.py-objdir-support.diff
authorSVN-Git Migration <python-modules-team@lists.alioth.debian.org>
Thu, 8 Oct 2015 20:39:16 +0000 (13:39 -0700)
committerAndreas Beckmann <anbe@debian.org>
Sun, 16 Jun 2019 12:55:29 +0000 (13:55 +0100)
02_configure.dpatch by Torsten Marek <shlomme@debian.org>
Updated for Qscintilla 2.8.2 configure.py changes by Scott Kitterman
<scott@kitterman.com>
patch the configure script for the Python bindings to support object dir
builds
Patch-Name: configure.py-objdir-support.diff

Gbp-Pq: Name 0002-configure.py-objdir-support.diff.patch

Python/configure.py

index 0bf24ba374555dd908049c91ceb04ca97eda980a..58902a596a025970cbd9f85aa22b98daedae3136 100644 (file)
@@ -37,6 +37,7 @@ import sys
 # You shouldn't need to modify anything above this line.
 ###############################################################################
 
+src_dir = os.path.dirname(os.path.abspath(__file__))
 
 # This must be kept in sync with Python/configure-old.py, qscintilla.pro,
 # example-Qt4Qt5/application.pro and designer-Qt4Qt5/designer.pro.
@@ -218,6 +219,8 @@ class ModuleConfiguration(object):
                     "The QScintilla version number could not be determined by "
                     "reading %s." % sciglobal)
 
+        return # Debian: do not check for the installed version, we're good this way.
+
         lib_dir = target_configuration.qsci_lib_dir
         if lib_dir is None:
             lib_dir = target_configuration.qt_lib_dir
@@ -276,7 +279,12 @@ class ModuleConfiguration(object):
         the target configuration.
         """
 
-        return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip'
+        if target_configuration.pyqt_package == 'PyQt5':
+            return os.path.join(src_dir, 'sip/qscimod5.sip')
+        else:
+            return os.path.join(src_dir, 'sip/qscimod4.sip')
+
+        #return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip'
 
     @staticmethod
     def get_sip_installs(target_configuration):