File tree 2 files changed +37
-6
lines changed
2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -Eexuo pipefail
4
4
5
- if [ " $RUNNER_OS " == " Linux" ]; then
6
- # Assume Ubuntu since this is the only Linux used in CI.
7
- sudo apt-get update
8
- sudo apt-get install -y --no-install-recommends \
9
- libkrb5-dev krb5-user krb5-kdc krb5-admin-server
5
+ if [[ $OSTYPE == linux* ]]; then
6
+ if [ " $( id -u) " = " 0" ]; then
7
+ SUDO=
8
+ else
9
+ SUDO=sudo
10
+ fi
11
+
12
+ if [ -e /etc/os-release ]; then
13
+ source /etc/os-release
14
+ elif [ -e /etc/centos-release ]; then
15
+ ID=" centos"
16
+ VERSION_ID=$( cat /etc/centos-release | cut -f3 -d' ' | cut -f1 -d.)
17
+ else
18
+ echo " install-postgres.sh: cannot determine which Linux distro this is" >&2
19
+ exit 1
20
+ fi
21
+
22
+ if [ " ${ID} " = " debian" -o " ${ID} " = " ubuntu" ]; then
23
+ export DEBIAN_FRONTEND=noninteractive
24
+
25
+ $SUDO apt-get update
26
+ $SUDO apt-get install -y --no-install-recommends \
27
+ libkrb5-dev krb5-user krb5-kdc krb5-admin-server
28
+ elif [ " ${ID} " = " almalinux" ]; then
29
+ $SUDO dnf install -y krb5-server krb5-libs
30
+ elif [ " ${ID} " = " centos" ]; then
31
+ $SUDO yum install -y krb5-server krb5-libs
32
+ elif [ " ${ID} " = " alpine" ]; then
33
+ $SUDO apk add krb5 krb5-server
34
+ else
35
+ echo " install-postgres.sh: Unsupported distro: ${distro} " >&2
36
+ exit 1
37
+ fi
10
38
fi
Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ test-command = "python {project}/tests/__init__.py"
81
81
test-command = " python {project}\\ tests\\ __init__.py"
82
82
83
83
[tool .cibuildwheel .linux ]
84
- before-all = " .github/workflows/install-postgres.sh"
84
+ before-all = """
85
+ .github/workflows/install-postgres.sh \
86
+ && .github/workflows/install-krb5.sh \
87
+ """
85
88
test-command = """ \
86
89
PY=`which python` \
87
90
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))" \
You can’t perform that action at this time.
0 commit comments