You may recall that last year I had an issue with the fact that due to the 
Debian/Ubuntu multi-arch implementation, I need to include headers from two 
different directories (one common and one arch specific):

http://www.riverbankcomputing.com/pipermail/pyqt/2012-October/032049.html

With the new Qscintilla2 Python/configure.py I ran into the same problem and 
solved it similarly.  Patch is attached.  Is this an appropriate approach?  It 
appears to work for both Python and Python3.

Scott K
Added to support multiple Python header directories for multi-arch
-I/usr/include/i386-linux-gnu/python2.7
Patch by Scott Kitterman <sc...@kitterman.com>, will be sent upstream

Index: qscintilla2-2.7.1/Python/configure.py
===================================================================
--- qscintilla2-2.7.1.orig/Python/configure.py	2013-03-06 16:46:05.860789440 -0500
+++ qscintilla2-2.7.1/Python/configure.py	2013-03-06 23:49:14.137777060 -0500
@@ -96,6 +96,7 @@
         if hasattr(sysconfig, 'get_path'):
             # The modern API.
             self.inc_dir = sysconfig.get_path('include')
+            self.py_conf_inc_dir = os.path.dirname(sysconfig.get_config_h_filename())
             self.module_dir = sysconfig.get_path('platlib')
         else:
             # The legacy distutils API.
@@ -154,6 +155,7 @@
         self.pyqt_sip_dir = os.path.join(py_config.data_dir, 'sip', 'PyQt4')
         self.qsci_sip_dir = self.pyqt_sip_dir
         self.py_inc_dir = py_config.inc_dir
+        self.py_conf_inc_dir = py_config.py_conf_inc_dir
         self.sip_inc_dir = py_config.inc_dir
         self.py_lib_dir = py_config.lib_dir
 
@@ -649,6 +651,8 @@
 
     pro.write('INCLUDEPATH += %s\n' % target_config.qsci_inc_dir)
     pro.write('INCLUDEPATH += %s\n' % target_config.py_inc_dir)
+    if target_config.py_inc_dir != target_config.py_conf_inc_dir:
+        pro.write('INCLUDEPATH += %s\n' % target_config.py_conf_inc_dir)
     if target_config.py_inc_dir != target_config.sip_inc_dir:
         pro.write('INCLUDEPATH += %s\n' % target_config.sip_inc_dir)
 
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to