summarylogtreecommitdiffstats
path: root/scidavis-python2.patch
blob: 87dc0e908419058a802cbcdfc7992759cfb04e9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff -ruN scidavis-1.17-orig/libscidavis/python.pri scidavis-1.17/libscidavis/python.pri
--- scidavis-1.17-orig/libscidavis/python.pri	2017-06-02 13:38:52.806445430 +0300
+++ scidavis-1.17/libscidavis/python.pri	2017-06-02 13:39:55.710957205 +0300
@@ -16,18 +16,18 @@
   SOURCES += src/PythonScript.cpp src/PythonScripting.cpp
 
   unix {
-    INCLUDEPATH += $$system(python-config --includes|sed -e 's/-I//')
+    INCLUDEPATH += $$system(python2-config --includes|sed -e 's/-I//')
     osx_dist {
       DEFINES += PYTHONHOME=/Applications/scidavis.app/Contents/Resources
-    } 
+    }
     system(mkdir -p $${SIP_DIR})
-    system($$system(python python-sipcmd.py) $$system(python-config --includes) -c $${SIP_DIR}  src/scidavis.sip)
+    system($$system(python2 python-sipcmd.py) $$system(python2-config --includes) -c $${SIP_DIR}  src/scidavis.sip)
   }
 
   win32 {
   mxe {
      DEFINES += SIP_STATIC_MODULE
-    system($$system(python python-sipcmd.py) -c $${SIP_DIR} src/scidavis.sip)
+    system($$system(python2 python-sipcmd.py) -c $${SIP_DIR} src/scidavis.sip)
   } else {
     INCLUDEPATH += $$system(call ../python-includepath.py)
     # TODO: fix the command below (only really necessary if SIP_DIR != MOC/OBJECTS_DIR)
diff -ruN scidavis-1.17-orig/scidavis/python.pri scidavis-1.17/scidavis/python.pri
--- scidavis-1.17-orig/scidavis/python.pri	2017-06-02 13:46:20.953100711 +0300
+++ scidavis-1.17/scidavis/python.pri	2017-06-02 13:47:05.315306277 +0300
@@ -9,10 +9,10 @@
 
   compiledScidavisrc.target = scidavisrc.pyc
   compiledScidavisrc.depends = scidavisrc.py
-  compiledScidavisrc.commands = python -m py_compile scidavisrc.py
+  compiledScidavisrc.commands = python2 -m py_compile scidavisrc.py
   compiledScidavisUtil.target = scidavisUtil.pyc
   compiledScidavisUtil.depends = scidavisUtil.py
-  compiledScidavisUtil.commands = python -m py_compile scidavisUtil.py
+  compiledScidavisUtil.commands = python2 -m py_compile scidavisUtil.py
   QMAKE_EXTRA_TARGETS += compiledScidavisrc compiledScidavisUtil
   PRE_TARGETDEPS += scidavisrc.pyc scidavisUtil.pyc
 
@@ -24,16 +24,16 @@
 
   message("Making PyQt bindings via SIP")
   unix {
-    INCLUDEPATH += $$system(python-config --includes|sed -e 's/-I//')
+    INCLUDEPATH += $$system(python2-config --includes|sed -e 's/-I//')
     osx_dist {
       DEFINES += PYTHONHOME=/Applications/scidavis.app/Contents/Resources
     } else {
       macx {
         LIBS += -framework Python
       } else {
-        LIBS += $$system(python -c "\"from distutils import sysconfig; print '-lpython'+sysconfig.get_config_var('VERSION')\"")
+        LIBS += $$system(python2 -c "\"from distutils import sysconfig; print '-lpython'+sysconfig.get_config_var('VERSION')\"")
       }
-    }     
+    }
     LIBS        += -lm
   }