forked from marcelm/cutadapt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildwheels.sh
executable file
·48 lines (41 loc) · 1.43 KB
/
buildwheels.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
#!/bin/bash
#
# Build manylinux1 wheels for cutadapt. 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/manylinux1_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/manylinux1_x86_64 /bin/bash
set -xeuo pipefail
# For convenience, if this script is called from outside of a docker container,
# it starts a container and runs itself inside of it.
if ! grep -q docker /proc/1/cgroup; then
# We are not inside a container
exec docker run --rm -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /io/$0
fi
# Python 2.6 is not supported
rm -r /opt/python/cp26*
PYBINS="/opt/python/*/bin"
HAS_CYTHON=0
for PYBIN in ${PYBINS}; do
${PYBIN}/pip install Cython
# ${PYBIN}/pip install -r /io/requirements.txt
${PYBIN}/pip wheel /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/cutadapt-*.whl; do
auditwheel repair "$whl" -w /io/wheelhouse/
done
# Created files are owned by root, so fix permissions.
chown -R --reference=/io/setup.py /io/wheelhouse/
# TODO Install packages and test them
#for PYBIN in ${PYBINS}; do
# ${PYBIN}/pip install cutadapt --no-index -f /io/wheelhouse
# (cd $HOME; ${PYBIN}/nosetests ...)
#done