forked from fepitre/qubes-polybar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-Allow-python2-for-old-Fedora.patch
76 lines (65 loc) · 3.05 KB
/
0001-Allow-python2-for-old-Fedora.patch
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
From 627b19db576cd4e703fd8e1289ec635f3c987de5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
Date: Sun, 19 Jan 2020 11:00:41 +0100
Subject: [PATCH] Allow python2 for old Fedora
---
lib/xpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule lib/xpp 8c019e6..a22970b:
diff --git a/lib/xpp/CMakeLists.txt b/lib/xpp/CMakeLists.txt
index 4de6688..bf4f5ab 100644
--- a/lib/xpp/CMakeLists.txt
+++ b/lib/xpp/CMakeLists.txt
@@ -10,7 +10,7 @@ find_package(PkgConfig)
pkg_check_modules(XCBPROTO REQUIRED xcb-proto)
# Store the location of the proto xml files inside XCBPROTO_XCBINCLUDEDIR
-if(${CMAKE_VERSION} VERSION_LESS "3.4.0")
+if(${CMAKE_VERSION} VERSION_LESS "3.4.0")
# pkg_get_variable was introduced in 3.4.0 if it isn't available, we fall back to ${prefix}/share/xcb
if(NOT XCBPROTO_PREFIX)
@@ -24,7 +24,7 @@ else()
pkg_get_variable(XCBPROTO_XCBINCLUDEDIR xcb-proto xcbincludedir)
endif()
-find_package(PythonInterp 3.5 REQUIRED)
+find_package(PythonInterp 2.7 REQUIRED)
find_package(XCB REQUIRED XCB ICCCM EWMH UTIL IMAGE)
if(NOT PYTHON_EXECUTABLE)
@@ -48,7 +48,7 @@ set(XPP_LIBRARIES
#
# Loop through a hardcoded list of python executables to locate the python module "xcbgen"
#
-foreach(CURRENT_EXECUTABLE python python3 python2 python2.7)
+foreach(CURRENT_EXECUTABLE python2 python2.7 python3 python)
message(STATUS "Searching for xcbgen with " ${CURRENT_EXECUTABLE})
execute_process(COMMAND "${CURRENT_EXECUTABLE}" "-c"
diff --git a/lib/xpp/generators/cpp_client.py b/lib/xpp/generators/cpp_client.py
index 64c070b..785f474 100644
--- a/lib/xpp/generators/cpp_client.py
+++ b/lib/xpp/generators/cpp_client.py
@@ -2497,7 +2497,7 @@ def _man_request(self, name, cookie_type, void, aux):
for field in b.type.fields:
_c_complex_field(self, field, space)
if b.type.has_name:
- print('ERROR: New unhandled documentation case', file=sys.stderr)
+ print >> sys.stderr, 'ERROR: New unhandled documentation case'
pass
f.write('} \\fB%s\\fP;\n' % self.reply.c_type)
@@ -2835,7 +2835,7 @@ def _man_event(self, name):
spacing = ' ' * (maxtypelen - len(field.c_field_type))
f.write('%s %s%s \\fI%s\\fP%s;\n' % (space, field.c_field_type, spacing, field.c_field_name, field.c_subscript))
else:
- print('ERROR: New unhandled documentation case', file=sys.stderr)
+ print >> sys.stderr, 'ERROR: New unhandled documentation case'
if not self.is_switch:
for field in struct_fields:
@@ -2848,7 +2848,7 @@ def _man_event(self, name):
for field in b.type.fields:
_c_complex_field(self, field, space)
if b.type.has_name:
- print('ERROR: New unhandled documentation case', file=sys.stderr)
+ print >> sys.stderr, 'ERROR: New unhandled documentation case'
pass
f.write('} \\fB%s\\fP;\n' % self.c_type)
--
2.21.1