forked from htseq/htseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildwheels.sh
More file actions
executable file
·50 lines (43 loc) · 1.45 KB
/
buildwheels.sh
File metadata and controls
executable file
·50 lines (43 loc) · 1.45 KB
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
#!/bin/bash
#
# Build manylinux wheels for HTSeq. Based on the example at
# <https://github.com/pypa/python-manylinux-demo>
#
# It is best to run this in a fresh clone of the repository!
#
# Run this within the repository root:
# docker run --rm -v $(pwd):/io quay.io/pypa/manylinuxXX_x86_64 /io/buildwheels.sh
#
# The wheels will be put into the wheelhouse/ subdirectory.
#
# For interactive tests:
# docker run -it -v $(pwd):/io quay.io/pypa/manylinuxXX_x86_64 /bin/bash
set -xeuo pipefail
echo "PYTHON_VERSION: ${PYTHON_VERSION}"
export PYTHON_FDN=cp$(echo ${PYTHON_VERSION} | sed 's/\.//')
PYBINS="/opt/python/${PYTHON_FDN}*/bin"
for PYBIN in ${PYBINS}; do
echo "PYBIN = ${PYBIN}"
echo "Install requirements..."
${PYBIN}/pip install setuptools wheel Cython Pillow matplotlib pandas
${PYBIN}/pip install -r /io/requirements.txt
echo "Build wheels..."
${PYBIN}/pip wheel /io/ -w wheelhouse/
done
# Repair HTSeq wheels, copy libraries
for whl in wheelhouse/*.whl; do
if [[ $whl == wheelhouse/HTSeq* ]]; then
echo "Repairing wheel: $whl"
auditwheel repair -L . $whl -w /io/wheelhouse/
else
echo "Copying wheel: $whl"
cp $whl /io/wheelhouse/
fi
done
# Created files are owned by root, so fix permissions.
chown -R --reference=/io/setup.py /io/wheelhouse/
echo "Build source dist..."
cd /io
${PYBIN}/python setup.py sdist --dist-dir /io/wheelhouse/
echo "Done building, ls of /io/wheelhouse:"
ls /io/wheelhouse