Commit 24f5a96c authored by Jérome Perrin's avatar Jérome Perrin

software/slapos-sr-testing: disallow usage of system python3

We had a mechanism to catch usage of system python2, but using not
for system python3, which cause the same kind of problems.
parent 698f69d5
...@@ -23,7 +23,7 @@ extends = ...@@ -23,7 +23,7 @@ extends =
parts = parts =
eggs/scripts eggs/scripts
python2.7-disabled system-python-disabled
slapos-cookbook slapos-cookbook
template template
...@@ -272,8 +272,8 @@ branch = master ...@@ -272,8 +272,8 @@ branch = master
egg = slapos.core egg = slapos.core
setup = ${slapos.core-repository:location} setup = ${slapos.core-repository:location}
[python2.7-disabled] [system-python-disabled]
# An "intentionally broken" python2 command that should catch # An "intentionally broken" python command that should catch
# accidental usage of things like #!/usr/bin/env python2 # accidental usage of things like #!/usr/bin/env python2
recipe = zc.recipe.egg recipe = zc.recipe.egg
# we need an egg to generate a script, use the one from this part's recipe # we need an egg to generate a script, use the one from this part's recipe
...@@ -286,10 +286,11 @@ entry-points = ...@@ -286,10 +286,11 @@ entry-points =
scripts = scripts =
python python
python2 python2
python3
python2.7 python2.7
initialization = initialization =
import sys import sys
print("Error: attempt to use system python2", file=sys.stderr) print("Error: attempt to use system python", file=sys.stderr)
sys.exit(2) sys.exit(2)
[recurls-repository] [recurls-repository]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment