Skip to content

Commit a77caa8

Browse files
committed
Updated CI scripts
1 parent d14a6ab commit a77caa8

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

ci/build-tool

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#
2929
# Contact: thomas.dreibholz@gmail.com
3030

31-
import distro
3231
import glob
3332
import http.client
3433
import os
@@ -43,8 +42,18 @@ import time
4342
import urllib.error
4443
import urllib.request
4544

45+
if sys.version_info < (3, 9):
46+
sys.stderr.write('ERROR: ' + sys.argv[0] + ' requires Python 3.9 or later!\n')
47+
sys.exit(1)
48+
4649
from typing import Any, Final, TextIO, cast
4750

51+
try:
52+
import distro
53+
except ImportError:
54+
sys.stderr.write('ERROR: ' + sys.argv[0] + ' requires the Python distro package!\n')
55+
sys.exit(1)
56+
4857

4958
# ###########################################################################
5059
# #### Constants ####

ci/ci-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set -eu
3434

3535
# ====== Check arguments ====================================================
3636
if [ $# -lt 1 ] ; then
37-
echo >&2 "Usage: $0 compile|package|... ..."
37+
echo >&2 "Usage: $0 compile|package ..."
3838
exit 1
3939
fi
4040

ci/ci-setup

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,24 @@
3232
set -eu
3333

3434

35+
# ====== Check arguments ====================================================
36+
if [ $# -lt 1 ] ; then
37+
echo >&2 "Usage: $0 compile|package ..."
38+
exit 1
39+
fi
40+
41+
3542
# ====== Check arguments ====================================================
3643
USE_PACKAGING=0
3744
while [ $# -gt 0 ] ; do
38-
if [ "$1" == "package" ] ; then
45+
TOOL="$1"
46+
if [ "${TOOL}" == "compile" ] ; then
47+
USE_PACKAGING=0
48+
elif [ "$1" == "package" ] ; then
3949
USE_PACKAGING=1
50+
else
51+
echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}!"
52+
exit 1
4053
fi
4154
shift
4255
done

ci/get-dependencies

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,24 @@
2828
#
2929
# Contact: thomas.dreibholz@gmail.com
3030

31-
import distro
3231
import glob
3332
import os
3433
import re
3534
import subprocess
3635
import sys
3736

37+
if sys.version_info < (3, 9):
38+
sys.stderr.write('ERROR: ' + sys.argv[0] + ' requires Python 3.9 or later!\n')
39+
sys.exit(1)
40+
3841
from typing import Final, TextIO
3942

43+
try:
44+
import distro
45+
except ImportError:
46+
sys.stderr.write('ERROR: ' + sys.argv[0] + ' requires the Python distro package!\n')
47+
sys.exit(1)
48+
4049

4150
# ###### Extract Deb file dependencies ######################################
4251
debDepLine : Final[re.Pattern[str]] = re.compile(r'^(.*:[ \t]*)(.*)$')

0 commit comments

Comments
 (0)