Commit 59041bd9 authored by Jérome Perrin's avatar Jérome Perrin

software/slapos-sr-testing: prevent softwares from using system python

Put broken python interpreters in path so that fail if they try to use
system python
parent 70070a61
......@@ -22,6 +22,7 @@ extends =
parts =
eggs/scripts
python2.7-disabled
slapos-cookbook
template
......@@ -251,6 +252,26 @@ branch = master
egg = slapos.core
setup = ${slapos.core-repository:location}
[python2.7-disabled]
# An "intentionally broken" python2 command that should catch
# accidental usage of things like #!/usr/bin/env python2
recipe = zc.recipe.egg
# we need an egg to generate a script, use the one from this part's recipe
eggs = ${:recipe}
interpreter = python2.7
entry-points =
python=${:eggs}:ignored
python2=${:eggs}:ignored
python2.7=${:eggs}:ignored
scripts =
python
python2
python2.7
initialization =
import sys
print("Error: attempt to use system python2", file=sys.stderr)
sys.exit(2)
[python-interpreter]
eggs +=
${lxml-python:egg}
......
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