Skip to content
Snippets Groups Projects
Commit 7df65fe5 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'wip/smcv/assert-sufficient-python' into 'master'

scripts: Assert that we have the desired Python version

See merge request steam/pressure-vessel!40
parents 80f1bb77 b4f85647
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ import os
import re
import shutil
import subprocess
import sys
import tempfile
try:
......@@ -659,6 +660,9 @@ def main():
if __name__ == '__main__':
assert sys.version_info >= (3, 5), \
'Python 3.5+ is required (configure with -Dpython=python3.5 ' \
'if necessary)'
logging.basicConfig()
main()
......
......@@ -24,6 +24,7 @@ Multi-Arch: foreign
Depends:
bubblewrap,
libcapsule-tools-relocatable,
python3 (>= 3.5) | python3.5,
steam-runtime-tools-bin,
${misc:Depends},
${shlibs:Depends},
......
......@@ -153,7 +153,7 @@ build:scout:
--archive "$(pwd)/_build" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
prove -v ./tests/relocatable-install.py :: \
prove -epython3.5 -v ./tests/relocatable-install.py :: \
"$(pwd)/_build/relocatable-install"
fi
......
......@@ -20,7 +20,13 @@ apt-get -y install \
--output "${AUTOPKGTEST_TMP}/relocatable-install" \
--archive "${AUTOPKGTEST_TMP}"
./tests/relocatable-install.py "${AUTOPKGTEST_TMP}/relocatable-install"
if command -v python3.5; then
PYTHON=python3.5
else
PYTHON=python3
fi
"$PYTHON" ./tests/relocatable-install.py "${AUTOPKGTEST_TMP}/relocatable-install"
for archive in "${AUTOPKGTEST_TMP}"/*.tar.*; do
echo "==== $(basename "$archive") ===="
......
......@@ -43,6 +43,8 @@ from gi.repository import Gtk
logger = logging.getLogger('pressure-vessel-test-ui')
assert sys.version_info >= (3, 4), 'Python 3.4+ is required for this script'
def tristate_environment(name):
# type: (str) -> typing.Optional[bool]
......
......@@ -5,6 +5,7 @@
import os
import subprocess
import sys
import tempfile
import unittest
......@@ -121,6 +122,10 @@ class TestCheapCopy(unittest.TestCase):
if __name__ == '__main__':
assert sys.version_info >= (3, 5), \
'Python 3.5+ is required (configure with -Dpython=python3.5 ' \
'if necessary)'
try:
from tap.runner import TAPTestRunner
except ImportError:
......
......@@ -232,6 +232,10 @@ def main():
if __name__ == '__main__':
assert sys.version_info >= (3, 5), \
'Python 3.5+ is required (configure with -Dpython=python3.5 ' \
'if necessary)'
main()
# vi: set sw=4 sts=4 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment