File: wheel-test-Linux.sh

package info (click to toggle)
mpi4py 4.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,564 kB
  • sloc: python: 35,306; ansic: 16,482; sh: 837; makefile: 618; cpp: 193; f90: 178
file content (54 lines) | stat: -rwxr-xr-x 1,156 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -euo pipefail

dist=${1:-dist}

sudo () {
    [ "$(id -u)" -eq 0 ] || set -- command sudo "$@"
    "$@"
}

# shellcheck disable=SC1091
(source /etc/os-release && echo "::group::$NAME $VERSION")

if grep -qE 'ID=(debian|ubuntu)' /etc/os-release; then
    packages=(
        python3-venv
        pypy3
        libmpich12
        libopenmpi3
    )
    export DEBIAN_FRONTEND=noninteractive
    sudo apt update -y
    sudo apt install -y "${packages[@]}"
    libdir=/usr/lib/$(uname -m)-linux-gnu
    test -L "$libdir"/libmpi.so.12 || \
    sudo ln -sr "$libdir"/libmpi{ch,}.so.12
fi

if grep -qE 'ID=fedora' /etc/os-release; then
    packages=(
        python3.9
        python3.10
        python3.11
        python3.12
        python3.13
        python3.14
        python3.13t
        python3.14t
        pypy3.11
        mpich
        openmpi
    )
    opts=(--setopt=install_weak_deps=False)
    sudo dnf install -y "${opts[@]}" "${packages[@]}"
    set +u
    # shellcheck disable=SC1091
    source /etc/profile.d/modules.sh
    set -u
fi

echo "::endgroup::"

sdir=$(cd "$(dirname -- "$0")" && pwd -P)
"$sdir"/wheel-test-basic.sh "$dist"