2020-04-28 18:23:44 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e -x
|
|
|
|
|
2020-10-04 09:46:38 +02:00
|
|
|
CC=cc
|
|
|
|
CXX=c++
|
|
|
|
|
|
|
|
export CC CXX
|
|
|
|
|
2020-04-28 18:23:44 +02:00
|
|
|
# Install a system package required by our library
|
|
|
|
#yum install -y atlas-devel
|
2023-01-31 14:38:04 +01:00
|
|
|
yum install -y cmake3 gsl-devel zlib-devel fftw3-devel libffi-devel hdf5 hdf5-devel
|
2020-04-28 18:23:44 +02:00
|
|
|
|
2020-04-28 22:34:49 +02:00
|
|
|
ln -fs /usr/bin/cmake3 /usr/bin/cmake
|
2020-04-28 18:23:44 +02:00
|
|
|
|
2020-04-28 22:34:49 +02:00
|
|
|
|
2023-02-27 14:16:36 +01:00
|
|
|
test -d /io/wheelhouse || mkdir /io/wheelhouse
|
|
|
|
test -d /io/wheelhouse/fix || mkdir /io/wheelhouse/fix
|
|
|
|
|
2023-01-31 14:38:04 +01:00
|
|
|
ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310"
|
2020-04-28 18:23:44 +02:00
|
|
|
|
|
|
|
# Compile wheels
|
|
|
|
for pkg in $ALL_PYTHON; do
|
|
|
|
PYBIN=/opt/python/${pkg}/bin
|
|
|
|
# "${PYBIN}/pip" install -r /io/dev-requirements.txt
|
2021-01-25 09:50:48 +01:00
|
|
|
"${PYBIN}/pip" install setuptools wheel Cython
|
2020-04-28 22:34:49 +02:00
|
|
|
"${PYBIN}/pip" install -r /io/requirements.txt
|
|
|
|
"${PYBIN}/pip" wheel -vvv /io/ -w wheelhouse/
|
2020-04-28 18:23:44 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Bundle external shared libraries into the wheels
|
2023-02-27 14:16:36 +01:00
|
|
|
for whl in /io/wheelhouse/cosmotool*.whl; do
|
|
|
|
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/fix
|
2020-04-28 18:23:44 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Install packages and test
|
2021-01-25 09:50:48 +01:00
|
|
|
#for pkg in $ALL_PYTHON; do
|
|
|
|
# PYBIN=/opt/python/${pkg}/bin
|
|
|
|
# "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse
|
|
|
|
#done
|