-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathdeploywheels.sh
executable file
·59 lines (52 loc) · 1.78 KB
/
deploywheels.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
#!/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/manylinux2010_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/manylinux2010_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/manylinux2010_x86_64 /io/$0
fi
# Python 2.6 is not supported
rm -rf /opt/python/cp26*
rm -rf /opt/python/cpython-2.6*
# Python 2.7 is deprecated
rm -rf /opt/python/cp27*
rm -rf /opt/python/cpython-2.7*
# Python 3.3-4 is not supported:
rm -rf /opt/python/cp33*
rm -rf /opt/python/cp34*
# Deploy binary packages
HTSEQ_VERSION=$(cat /io/VERSION)
PYBINS="/opt/python/*/bin"
ERRS=0
for PYBIN in ${PYBINS}; do
PYVER=$(basename $(dirname ${PYBIN}))
echo "PYVER=$PYVER"
echo "TWINE_REPOSITORY=$TWINE_REPOSITORY"
echo "TWINE_USERNAME=$TWINE_USERNAME"
echo "TWINE_PASSWORD=$TWINE_PASSWORD"
${PYBIN}/pip install twine
${PYBIN}/twine upload --repository-url "${TWINE_REPOSITORY}" -u "${TWINE_USERNAME}" -p "${TWINE_PASSWORD}" /io/wheelhouse/HTSeq-${HTSEQ_VERSION}-${PYVER}-manylinux2010_x86_64.whl
if [ $? != 0 ]; then
ERRS=1
fi
done
# Deploy source code
${PYBIN}/twine upload --repository-url "${TWINE_REPOSITORY}" -u "${TWINE_USERNAME}" -p "${TWINE_PASSWORD}" /io/wheelhouse/HTSeq-${HTSEQ_VERSION}.tar.gz
if [ $? != 0 ]; then
ERRS=1
fi
exit $ERRS