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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
From cd5b64f9e21ef886055e11c47314956672c528af Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date: Mon, 27 Oct 2014 21:49:47 -0400
Subject: [PATCH 3/5] Use Python 2
---
compizconfig/ccsm/CMakeLists.txt | 6 +++---
compizconfig/ccsm/Makefile | 6 +++---
compizconfig/ccsm/ccsm | 2 +-
compizconfig/compizconfig-python/CMakeLists.txt | 6 +++---
compizconfig/compizconfig-python/Makefile | 6 +++---
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/compizconfig/ccsm/CMakeLists.txt b/compizconfig/ccsm/CMakeLists.txt
index a3941a7..242bfd5 100644
--- a/compizconfig/ccsm/CMakeLists.txt
+++ b/compizconfig/ccsm/CMakeLists.txt
@@ -12,7 +12,7 @@ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
execute_process (COMMAND uname -p OUTPUT_VARIABLE PROC_ARCH)
# Get Python Version
-execute_process (COMMAND python -c "import sys; print str (sys.version_info[0]) + '.' + str (sys.version_info[1])"
+execute_process (COMMAND python2 -c "import sys; print str (sys.version_info[0]) + '.' + str (sys.version_info[1])"
OUTPUT_VARIABLE PY_VERSION)
string (REPLACE "\n" "" PROC_ARCH ${PROC_ARCH})
@@ -36,14 +36,14 @@ string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
set (VERSION ${COMPIZ_RELEASE_VERSION})
add_custom_command (OUTPUT ${PY_CCSM_LIB}
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
+ COMMAND python2 ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating Python Bytecode")
add_custom_target (ccsm_module ALL DEPENDS
${PY_CCSM_LIB})
-set (UNINSTALL_COMMAND "python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX} --version=${VERSION}")
+set (UNINSTALL_COMMAND "python2 ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX} --version=${VERSION}")
compiz_add_code_to_uninstall_target (${UNINSTALL_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/compizconfig/ccsm/Makefile b/compizconfig/ccsm/Makefile
index a86f93a..bf37c2b 100644
--- a/compizconfig/ccsm/Makefile
+++ b/compizconfig/ccsm/Makefile
@@ -1,11 +1,11 @@
all:
- @python setup.py build --prefix=${PREFIX}
+ @python2 setup.py build --prefix=${PREFIX}
install: all
- @python setup.py install --prefix=${PREFIX}
+ @python2 setup.py install --prefix=${PREFIX}
uninstall:
- @python setup.py uninstall --prefix=${PREFIX}
+ @python2 setup.py uninstall --prefix=${PREFIX}
clean:
rm -rf build/
diff --git a/compizconfig/ccsm/ccsm b/compizconfig/ccsm/ccsm
index a112f2d..042bdf4 100755
--- a/compizconfig/ccsm/ccsm
+++ b/compizconfig/ccsm/ccsm
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# This program is free software; you can redistribute it and/or
diff --git a/compizconfig/compizconfig-python/CMakeLists.txt b/compizconfig/compizconfig-python/CMakeLists.txt
index d6125d5..b0f7285 100644
--- a/compizconfig/compizconfig-python/CMakeLists.txt
+++ b/compizconfig/compizconfig-python/CMakeLists.txt
@@ -5,7 +5,7 @@ set (CMAKE_PROJECT_NAME compizconfig-python)
execute_process (COMMAND uname -p OUTPUT_VARIABLE PROC_ARCH)
# Get Python Version
-execute_process (COMMAND python -c "import sys; print str (sys.version_info[0]) + '.' + str (sys.version_info[1])"
+execute_process (COMMAND python2 -c "import sys; print str (sys.version_info[0]) + '.' + str (sys.version_info[1])"
OUTPUT_VARIABLE PY_VERSION)
include (FindPkgConfig)
@@ -79,7 +79,7 @@ target_link_libraries (compizconfig_python_module
${PYTHON_LIBRARY_LOCAL}
compizconfig)
-set (UNINSTALL_COMMAND "python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX} --version=${VERSION}")
+set (UNINSTALL_COMMAND "python2 ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX} --version=${VERSION}")
compiz_add_code_to_uninstall_target (${UNINSTALL_COMMAND} ${CMAKE_CURRENT_BINARY_DIR})
@@ -107,7 +107,7 @@ install (CODE
if (COMPIZ_BUILD_TESTING)
find_program (BASH_EXECUTABLE bash)
- find_program (PYTHON_EXECUTABLE python)
+ find_program (PYTHON_EXECUTABLE python2)
mark_as_advanced (FORCE PYTHON_EXECUTABLE)
file (GLOB PYTHON_TESTS "tests/test_*.py")
diff --git a/compizconfig/compizconfig-python/Makefile b/compizconfig/compizconfig-python/Makefile
index a86f93a..bf37c2b 100644
--- a/compizconfig/compizconfig-python/Makefile
+++ b/compizconfig/compizconfig-python/Makefile
@@ -1,11 +1,11 @@
all:
- @python setup.py build --prefix=${PREFIX}
+ @python2 setup.py build --prefix=${PREFIX}
install: all
- @python setup.py install --prefix=${PREFIX}
+ @python2 setup.py install --prefix=${PREFIX}
uninstall:
- @python setup.py uninstall --prefix=${PREFIX}
+ @python2 setup.py uninstall --prefix=${PREFIX}
clean:
rm -rf build/
--
2.1.2
|