aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/singularity/singularity/0001-Use-python3.patch
blob: dbfe06e48efd3c4ca70ad7f4bdf6737fbb8e32c3 (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
From 758c1edc7bf3d2a023954f4fcc9ddf46fd370272 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 21 May 2020 14:14:56 +0200
Subject: [PATCH] Use python3

* without /usr/bin/python this just fails to configure with:
  | checking for python... no
  | configure: error: Please install python before installing.
  | WARNING: exit code 1 from a shell command.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 configure.ac                           | 6 +++---
 etc/configure_transform.py             | 2 +-
 libexec/python/helpers/json/add.py     | 2 +-
 libexec/python/helpers/json/delete.py  | 2 +-
 libexec/python/helpers/json/dump.py    | 2 +-
 libexec/python/helpers/json/get.py     | 2 +-
 libexec/python/helpers/json/inspect.py | 2 +-
 libexec/python/import.py               | 2 +-
 libexec/python/pull.py                 | 2 +-
 libexec/python/shub/api.py             | 2 +-
 libexec/python/size.py                 | 2 +-
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8ffa5ab32..71a1605b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,15 +251,15 @@ fi
 # PYTHON
 # ---------------------------------------------------------------------
 
-AC_CHECK_PROG(PYTHON_CHECK,python,yes)
+AC_CHECK_PROG(PYTHON_CHECK,python3,yes)
 if test x"$PYTHON_CHECK" != x"yes" ; then
-    AC_MSG_ERROR([Please install python before installing.])
+    AC_MSG_ERROR([Please install python3 before installing.])
 else
 
     PYTHON_MODULES="base64 datetime glob hashlib io itertools json math multiprocessing pickle pwd re shutil signal subprocess stat sys tarfile tempfile time"
     for PYTHON_MODULE in $PYTHON_MODULES; do
         AC_MSG_CHECKING([for the $PYTHON_MODULE python module])
-	    python_module_result=`python -c "import $PYTHON_MODULE" 2>&1`
+	    python_module_result=`python3 -c "import $PYTHON_MODULE" 2>&1`
 	    if test -z "$python_module_result"; then
 		AC_MSG_RESULT([yes])
 	    else
diff --git a/etc/configure_transform.py b/etc/configure_transform.py
index a1ff5c427..9ec445d21 100755
--- a/etc/configure_transform.py
+++ b/etc/configure_transform.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # 
 # Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
 #
diff --git a/libexec/python/helpers/json/add.py b/libexec/python/helpers/json/add.py
index b24aec75a..22abbbeb9 100644
--- a/libexec/python/helpers/json/add.py
+++ b/libexec/python/helpers/json/add.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/helpers/json/delete.py b/libexec/python/helpers/json/delete.py
index 0975e4e60..07e255228 100644
--- a/libexec/python/helpers/json/delete.py
+++ b/libexec/python/helpers/json/delete.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/helpers/json/dump.py b/libexec/python/helpers/json/dump.py
index ddba06e4a..37a8edf70 100644
--- a/libexec/python/helpers/json/dump.py
+++ b/libexec/python/helpers/json/dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/helpers/json/get.py b/libexec/python/helpers/json/get.py
index 355be9040..d1d822aea 100644
--- a/libexec/python/helpers/json/get.py
+++ b/libexec/python/helpers/json/get.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/helpers/json/inspect.py b/libexec/python/helpers/json/inspect.py
index 65772a4ef..61c723495 100644
--- a/libexec/python/helpers/json/inspect.py
+++ b/libexec/python/helpers/json/inspect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/import.py b/libexec/python/import.py
index 2ec208417..1c58eda5c 100644
--- a/libexec/python/import.py
+++ b/libexec/python/import.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/pull.py b/libexec/python/pull.py
index 1cd705c90..4431023f3 100644
--- a/libexec/python/pull.py
+++ b/libexec/python/pull.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/shub/api.py b/libexec/python/shub/api.py
index 850d167e7..3c8313ad5 100644
--- a/libexec/python/shub/api.py
+++ b/libexec/python/shub/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''
 
diff --git a/libexec/python/size.py b/libexec/python/size.py
index 34331fd27..99581ce52 100644
--- a/libexec/python/size.py
+++ b/libexec/python/size.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''