File: build-wheels.sh

package info (click to toggle)
python-jpype 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,348 kB
  • sloc: python: 19,275; cpp: 18,049; java: 8,638; xml: 1,454; makefile: 155; sh: 37
file content (43 lines) | stat: -rwxr-xr-x 1,219 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
#!/bin/bash
set -e -x

pys=()
echo "Available Python bins:"
ls -d /opt/python/cp*/bin 

for pybin in /opt/python/cp*/bin; do
    # Exclude 3.6, 3.7, 3.8 and any alpha/beta/rc release
    if [[ "$dir" =~ ^cp3(6|7|8|9|14)-cp3(6|7|8|9|14)t?$ ]]; then
        continue
    fi
    pys+=("$pybin")
done

# Show what you found for debugging
echo "Found Python bins:"
printf '%s\n' "${pys[@]}"

# Compile wheels
for PYBIN in "${pys[@]}"; do
    echo "Compile $PYBIN"
    ls -l /io/dist
    "${PYBIN}/pip" install -r /io/dev-requirements.txt
    "${PYBIN}/pip" wheel /io/dist/$package_name-*.tar.gz -w wheelhouse/ -v
done
echo "=============="

# Bundle external shared libraries into the wheels
for whl in wheelhouse/$package_name-*.whl; do
    echo "Audit $whl"
    auditwheel repair --plat $PLAT "$whl" -w /io/wheelhouse/
done
echo "=============="

# Install packages and test
for PYBIN in "${pys[@]}"; do
    echo "Test install $PYBIN $package_name"
    "${PYBIN}/python" -m pip install $package_name --no-index -f /io/wheelhouse
    # Manylinux does not have a JVM so there is no way to test the wheel in the docker
    # "${PYBIN}/pip" install -r /io/test-requirements.txt
    # "${PYBIN}/pytest" /io/test/jpypetest
done