summaryrefslogtreecommitdiffstats
path: root/debian/patches/python3.patch
blob: f445d081c5dbd2db6660da7b1e00f15faba5d45b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Don't consider `python` a valid python[23]? interpreter.
 Just to be safe, don't even try to look it up.
 Should be safe to drop the patch once python2 is not around anymore.
Author: Mattia Rizzolo <mattia@debian.org>
Forwarded: not-needed
Last-Update: 2020-05-07

--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -86,9 +86,11 @@
     { "python",  {"python-interpreter",  {"python3"           }}},
 #else
     { "perl",    {"perl-interpreter",    {"perl"              }}},
-    { "python",  {"python-interpreter",  {"python3", "python" }}},
+    /* don't consider `python` a valid python(3) interpreter */
+    { "python",  {"python-interpreter",  {"python3"           }}},
 #endif
-    { "python2", {"python2-interpreter", {"python2", "python" }}},
+    /* don't consider `python` a valid python(2) interpreter either */
+    { "python2", {"python2-interpreter", {"python2" }}},
     { "ruby",    {"ruby-interpreter",    {"ruby"    }}},
     { "shell",   {"shell-interpreter",   {"sh"      }}},
     // clang-format on