forked from python-pendulum/pendulum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-wheels.sh
executable file
·25 lines (22 loc) · 963 Bytes
/
build-wheels.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
#!/bin/bash
PYTHON_VERSIONS="cp27-cp27m cp35-cp35m cp36-cp36m"
echo "Compile wheels"
for PYTHON in ${PYTHON_VERSIONS}; do
cd /io
/opt/python/${PYTHON}/bin/pip install -r wheels-requirements.txt
/opt/python/${PYTHON}/bin/pip install -r tests-requirements.txt
/opt/python/${PYTHON}/bin/python setup.py sdist --dist-dir wheelhouse --formats=gztar
/opt/python/${PYTHON}/bin/pip wheel --no-index --no-deps --wheel-dir wheelhouse wheelhouse/*.tar.gz
cd -
done
echo "Bundle external shared libraries into the wheels"
for whl in /io/wheelhouse/*.whl; do
auditwheel repair $whl -w /io/wheelhouse/
done
echo "Install packages and test"
for PYTHON in ${PYTHON_VERSIONS}; do
/opt/python/${PYTHON}/bin/pip install pendulum --no-index -f /io/wheelhouse
find ./io/tests | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf
/opt/python/${PYTHON}/bin/py.test /io/tests
find ./io/tests | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf
done