summarylogtreecommitdiffstats
path: root/build.patch
blob: a9d8dbd3922bcd4b7c8dacebe171c68f3c66164f (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff --git CMakeLists.txt CMakeLists.txt
index 0e054ca..fe2b3f6 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -144,7 +144,7 @@ else()
 
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -std=c++11 -msse4.1")
     if (NOT APPLE)
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic -Wno-date-time")
     else()
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-date-time")
     endif()
diff --git src/build/build-info src/build/build-info
index de58622..1016417 100755
--- src/build/build-info
+++ src/build/build-info
@@ -11,7 +11,7 @@ if 'MACOSX_DEPLOYMENT_TARGET' in os.environ:
 from distutils import sysconfig as sc
 
 import sipconfig
-from PyQt4 import pyqtconfig
+#from PyQt4 import pyqtconfig
 
 def main():
     parser = argparse.ArgumentParser()
@@ -56,8 +56,9 @@ def python_site(args):
 
 
 def pyqt4_sip(args):
-    pkg_cfg = pyqtconfig._pkg_config
-    return pkg_cfg['pyqt_sip_dir']
+    #pkg_cfg = pyqtconfig._pkg_config
+    #return pkg_cfg['pyqt_sip_dir']
+    return os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt4')
 
 
 def sip_inc(args):
diff --git src/py/CMakeLists.txt src/py/CMakeLists.txt
index a3552f9..c4beb8c 100644
--- src/py/CMakeLists.txt
+++ src/py/CMakeLists.txt
@@ -25,7 +25,7 @@ if (USE_PYTHON)
         IF (NOT DEFINED PYTHON_VERSION)
             execute_process(
                 COMMAND
-                python -c "import sys; print('%s.%s' % sys.version_info[:2])"
+                python2 -c "import sys; print('%s.%s' % sys.version_info[:2])"
                 OUTPUT_VARIABLE PYTHON_VERSION
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
         endif()
@@ -34,7 +34,7 @@ if (USE_PYTHON)
         if (NOT DEFINED PYTHON_INCLUDE_DIR)
             execute_process(
                 COMMAND
-                sh -c "python-config --includes | sed -e s,-I,,g"
+                sh -c "python2-config --includes | sed -e s,-I,,g"
                 OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
             separate_arguments(PYTHON_INCLUDE_DIR)
@@ -45,7 +45,7 @@ if (USE_PYTHON)
         if (NOT DEFINED PYTHON_LIB_DIRS)
             execute_process(
                 COMMAND
-                sh -c "python-config --ldflags | tr ' ' '\\n' | grep ^-L | sed -e s,-L,, | tr '\\n' ' '"
+                sh -c "python2-config --ldflags | tr ' ' '\\n' | grep ^-L | sed -e s,-L,, | tr '\\n' ' '"
                 OUTPUT_VARIABLE PYTHON_LIB_DIRS
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
             if (NOT ${PYTHON_LIB_DIRS} STREQUAL "")
@@ -61,7 +61,7 @@ if (USE_PYTHON)
         if (NOT DEFINED PYTHON_LIBRARIES)
             execute_process(
                 COMMAND
-                sh -c "python-config --ldflags | tr ' ' '\\n' | grep ^-l | sed -e s,-l,, | tr '\\n' ' '"
+                sh -c "python2-config --ldflags | tr ' ' '\\n' | grep ^-l | sed -e s,-l,, | tr '\\n' ' '"
                 OUTPUT_VARIABLE PYTHON_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
             separate_arguments(PYTHON_LIBRARIES)
         endif()

diff --git src/ui/CMakeLists.txt src/ui/CMakeLists.txt
index d40c02e..b3a541e 100644
--- src/ui/CMakeLists.txt
+++ src/ui/CMakeLists.txt
@@ -15,9 +15,11 @@
 
 # Find python includes and libs. cmake doesn't seem to handle automatically
 
+set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 2.4)
 find_package(PythonInterp)
 find_package(PythonLibs)
 
+if(PYTHONLIBS_FOUND)
 macro(get_build_info NAME STORAGE)
     execute_process(
         COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/build/build-info ${NAME}
@@ -148,4 +150,5 @@ if(QT4_FOUND)
     install(TARGETS expreditor2 DESTINATION ${CMAKE_INSTALL_PYTHON})
     install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
             DESTINATION ${CMAKE_INSTALL_PYTHON})
-endif()
+endif(QT4_FOUND)
+endif(PYTHONLIBS_FOUND)
\ No newline at end of file