-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build-wheels.sh
72 lines (62 loc) · 1.77 KB
/
.build-wheels.sh
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
set -ex
export NAME=eudist
export PLAT=$1
function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
else
auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/
fi
}
declare -A SKIP
for PYBIN in /opt/python/cp3*/bin;
do
allowfail=0
fail=0
npv=1.15
PYV=$($PYBIN/python -V |grep 3.. -o)
test $PYV = 3.8 && npv=1.18
test $PYV = 3.9 && npv=1.19
PYV=$($PYBIN/python -V |grep 3... -o)
test $PYV = 3.10 && npv=1.21
test $PYV = 3.11 && npv=1.22
test $PYV = 3.12 && allowfail=1
test PLAT = manylinux_2_24_i686 && allowfail=1
$PYBIN/pip install numpy~=$npv.0 cython setuptools_scm || fail=1
if test $fail = 1 ; then
if test $allowfail = 1 ; then
SKIP["$PYV"]=1
continue
fi
exit $fail
fi
git checkout -- setup.cfg
export SETUPTOOLS_SCM_PRETEND_VERSION=$($PYBIN/python3 -c 'from setuptools_scm import get_version ;print(get_version("."))')
sed -e "s/numpy.*/numpy>=$($PYBIN/python -c 'from numpy.version import version; print(version)')/" -i setup.cfg
grep numpy setup.cfg
PY=$PYBIN/python make
"${PYBIN}/pip" wheel . --no-deps --no-build-isolation -w wheelhouse/
done
for whl in wheelhouse/*.whl; do
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/../../../lib/ repair_wheel "$whl"
done
ls -l /io/wheelhouse
for PYBIN in /opt/python/cp3*/bin/; do
PYV=$($PYBIN/python -V |grep 3... -o)
[[ ${SKIP["$PYV"]} ]] && continue
"${PYBIN}/pip" install $NAME --no-index -f /io/wheelhouse
if test -e "${PYBIN}/nosetests"
then
(
cd "$HOME"
"${PYBIN}/nosetests" $NAME
)
fi
done
ls -l wheelhouse || :
mkdir -p wheelhouse
rm -f wheelhouse/*whl
ls -l wheelhouse
cp /io/wheelhouse/*whl wheelhouse/
ls -l wheelhouse