Skip to content

Commit f4d6cab

Browse files
committed
Install Kerberos deps when testing wheels
1 parent f6ec755 commit f4d6cab

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/workflows/install-krb5.sh

+27-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,31 @@
22

33
set -Eexuo pipefail
44

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 [ -e /etc/os-release ]; then
7+
source /etc/os-release
8+
elif [ -e /etc/centos-release ]; then
9+
ID="centos"
10+
VERSION_ID=$(cat /etc/centos-release | cut -f3 -d' ' | cut -f1 -d.)
11+
else
12+
echo "install-postgres.sh: cannot determine which Linux distro this is" >&2
13+
exit 1
14+
fi
15+
16+
if [ "${ID}" = "debian" -o "${ID}" = "ubuntu" ]; then
17+
export DEBIAN_FRONTEND=noninteractive
18+
19+
sudo apt-get update
20+
sudo apt-get install -y --no-install-recommends \
21+
libkrb5-dev krb5-user krb5-kdc krb5-admin-server
22+
elif [ "${ID}" = "almalinux" ]; then
23+
sudo dnf install -y krb5-server krb5-libs
24+
elif [ "${ID}" = "centos" ]; then
25+
sudo yum install -y krb5-server krb5-libs
26+
elif [ "${ID}" = "alpine" ]; then
27+
sudo apk add krb5 krb5-server
28+
else
29+
echo "install-postgres.sh: Unsupported distro: ${distro}" >&2
30+
exit 1
31+
fi
1032
fi

pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ test-command = "python {project}/tests/__init__.py"
8181
test-command = "python {project}\\tests\\__init__.py"
8282

8383
[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+
"""
8588
test-command = """\
8689
PY=`which python` \
8790
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))" \

0 commit comments

Comments
 (0)