-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild-manylinux-whls.sh
executable file
·43 lines (38 loc) · 1.17 KB
/
build-manylinux-whls.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
#!/usr/bin/env bash
# Does the heavy lifting of building manylinux1 wheels
# Hijacked mostly from https://github.com/pypa/python-manylinux-demo
#
# See also:
# - https://www.python.org/dev/peps/pep-0513/#the-manylinux1-policy
# - https://github.com/pypa/manylinux
set -ex
{
cat /etc/redhat-release;
ls -UC /opt/python/
protoc --version
pkg-config --cflags protobuf
pkg-config --libs protobuf
} > /io/system_info.log
for PYBIN in /opt/python/*/bin; do
case "$PYBIN" in
*'27'*)
;;
*'35'*)
;;
*)
# Py36+ only
echo "Building wheel for $PYBIN"
rm -vf /io/cld3/pycld3.cpp
"${PYBIN}/pip" install -U pip wheel setuptools
"${PYBIN}/pip" install --disable-pip-version-check cryptography --only-binary cryptography
"${PYBIN}/pip" install --disable-pip-version-check --upgrade -r /io/requirements-dev.txt
USE_CYTHON=1 "${PYBIN}/python" setup.py --quiet build
"${PYBIN}/pip" wheel -v -w wheelhouse/ /io/
;;
esac
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
echo "Vendoring in external shared libs for $whl"
auditwheel repair "$whl" --plat "$PLAT" -w /io/wheelhouse/
done