forked from SSCHAcode/CellConstructor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-wheels.sh
More file actions
executable file
·31 lines (25 loc) · 802 Bytes
/
build-wheels.sh
File metadata and controls
executable file
·31 lines (25 loc) · 802 Bytes
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
#!/bin/bash
set -e -u -x
function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
elif echo "$wheel" | grep -q manylinux; then
echo "Skipping wheel $wheel"
else
auditwheel repair "$wheel" --plat "$PLAT" -w /io/dist/
fi
}
# Install a system package required by our library
yum install -y atlas-devel lapack-devel blas-devel libjpeg-devel
mkdir -p /io/dist/
# Compile wheels (only python >= 3.5)
for PYBIN in /opt/python/cp3*/bin; do
"${PYBIN}/pip" install -r /io/requirements.txt
cd /io; "${PYBIN}/python" setup.py build
"${PYBIN}/pip" wheel /io/ --no-deps -w /io/dist/
done
# Bundle external shared libraries into the wheels
for whl in /io/dist/*.whl; do
repair_wheel "$whl"
done