Skip to content

Commit f7950e4

Browse files
committedFeb 19, 2024
Generalize check script
1 parent 621e433 commit f7950e4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎check-wheel.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
mpiname="${MPINAME:-mpich}"
5-
variant="${VARIANT:-}"
6-
test -z "$variant" \
7-
&& pkgname="${mpiname}" \
8-
|| pkgname="${mpiname}_${variant}"
9-
104
wheelhouse="${1:-wheelhouse}"
115
ls -d "$wheelhouse" > /dev/null
126

@@ -15,12 +9,18 @@ tempdir=$(mktemp -d)
159
workdir=$tempdir/wheel
1610
trap 'rm -rf $tempdir' EXIT
1711

18-
for wheelfile in "$wheelhouse/$pkgname"-*.whl; do
12+
for wheelfile in "$wheelhouse"/*.whl; do
1913
cd "$savedir" && rm -rf "$workdir"
2014
unzip -vv "$wheelfile"
2115
unzip -qq "$wheelfile" -d "$workdir"
2216
cd "$workdir"
2317

18+
whlname=$(basename "$wheelfile")
19+
pkgname=${whlname%%-*}
20+
mpiname=${pkgname%_*}
21+
variant=${pkgname#"${mpiname}"}
22+
variant=${variant#_}
23+
2424
data=$(ls -d "$pkgname"-*.data/data)
2525
if test "$(uname)" = Linux; then
2626
# shellcheck disable=SC2016

0 commit comments

Comments
 (0)
Please sign in to comment.