Skip to content

Commit 1c59776

Browse files
committed
Fix package build for travis: use extended cleanup
Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent 4495256 commit 1c59776

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/build-wheels.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash
2+
set -e
23
PYTHON_VERSIONS="cp36-cp36m cp37-cp37m"
34

45
# Avoid creation of __pycache__/*.py[c|o]
56
export PYTHONDONTWRITEBYTECODE=1
67

78
package_name="$1"
8-
if [ -z "$package_name" ]
9+
if [[ -z "$package_name" ]]
910
then
1011
&>2 echo "Please pass package name as a first argument of this script ($0)"
1112
exit 1
@@ -53,13 +54,20 @@ for PYTHON in ${PYTHON_VERSIONS}; do
5354
/opt/python/${PYTHON}/bin/python -c "import platform;print(platform.platform())"
5455
/opt/python/${PYTHON}/bin/pip install "$package_name" --no-index -f file:///io/dist
5556
/opt/python/${PYTHON}/bin/pip install asynctest pytest pytest-asyncio pytest-mock
56-
/opt/python/${PYTHON}/bin/py.test -vv /io/test
57+
/opt/python/${PYTHON}/bin/py.test -vvv /io/test
5758
done
5859

5960
find /io/dist/ -type f -not -name "*$package_name*" -delete
6061
rm -rf /io/.eggs
6162
rm -rf /io/build
6263
rm -rf /io/*.egg-info
6364
rm -rf /io/.pytest_cache
65+
rm -rf /io/.tox
66+
rm -f /io/.coverage
67+
# Clean caches and cythonized
68+
find -name *.py[co] -delete
69+
find -name *.c -delete
70+
# Reset permissions
6471
chmod -v a+rwx /io/dist
6572
chmod -v a+rw /io/dist/*
73+
chmod -vR a+rw /io/"$package_name"

0 commit comments

Comments
 (0)