Skip to content

Commit 86d1597

Browse files
committed
Update build script
1 parent 77e025f commit 86d1597

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

.pylintrc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ignore=CVS
1111

1212
# Add files or directories matching the regex patterns to the blacklist. The
1313
# regex matches against base names, not paths.
14-
ignore-patterns=
14+
ignore-patterns=_version.py
1515

1616
# Python code to execute, usually for sys.path manipulation such as
1717
# pygtk.require().
@@ -62,6 +62,8 @@ confidence=
6262
# --enable=similarities". If you want to run only the classes checker, but have
6363
# no Warning level messages displayed, use "--disable=all --enable=classes
6464
# --disable=W".
65+
enable=all
66+
6567
disable=non-ascii-bytes-literal,
6668
raw-checker-failed,
6769
bad-inline-option,
@@ -70,10 +72,6 @@ disable=non-ascii-bytes-literal,
7072
suppressed-message,
7173
no-absolute-import,
7274
eq-without-hash,
73-
exception-message-attribute,
74-
invalid-str-codec,
75-
next-method-defined,
76-
xreadlines-attribute,
7775
comprehension-escape,
7876
similarities,
7977
too-many-ancestors,
@@ -95,7 +93,7 @@ disable=non-ascii-bytes-literal,
9593
# either give multiple identifier separated by comma (,) or put this option
9694
# multiple time (only on the command line, not in the configuration file where
9795
# it should appear only once). See also the "--disable" option for examples.
98-
enable=c-extension-no-member
96+
# enable=c-extension-no-member
9997

10098

10199
[REPORTS]

tools/build-wheels.sh

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
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
1213
fi
1314

14-
arch=`uname -m`
15+
arch=$(uname -m)
1516

1617
# Clean-up
1718
rm -rf /io/.tox
1819
rm -rf /io/*.egg-info
1920
rm -rf /io/.pytest_cache
20-
find -name *.py[co] -delete
21+
find /io/ -noleaf -name *.py[co] -delete
2122

2223
echo
2324
echo
2425
echo "Compile wheels"
2526
for PYTHON in ${PYTHON_VERSIONS}; do
26-
/opt/python/${PYTHON}/bin/pip install -U pip setuptools wheel
27-
/opt/python/${PYTHON}/bin/pip install -r /io/build_requirements.txt
28-
/opt/python/${PYTHON}/bin/pip wheel /io/ -w /io/dist/
27+
/opt/python/"${PYTHON}"/bin/pip install -U pip setuptools wheel
28+
/opt/python/"${PYTHON}"/bin/pip install -r /io/build_requirements.txt
29+
/opt/python/"${PYTHON}"/bin/pip wheel /io/ -w /io/dist/
2930
cd /io
30-
/opt/python/${PYTHON}/bin/python setup.py bdist_wheel
31-
/opt/python/${PYTHON}/bin/python setup.py clean
32-
rm -rf /io/build
31+
/opt/python/"${PYTHON}"/bin/python setup.py bdist_wheel
32+
/opt/python/"${PYTHON}"/bin/python setup.py clean
3333
done
3434

3535
echo
@@ -52,17 +52,23 @@ ls /io/dist
5252
for PYTHON in ${PYTHON_VERSIONS}; do
5353
echo
5454
echo -n "Test $PYTHON: $package_name "
55-
/opt/python/${PYTHON}/bin/python -c "import platform;print(platform.platform())"
56-
/opt/python/${PYTHON}/bin/pip install "$package_name" --no-index -f file:///io/dist
57-
/opt/python/${PYTHON}/bin/pip install pytest
58-
/opt/python/${PYTHON}/bin/py.test -vv /io/test
59-
rm -rf /io/.pytest_cache
55+
/opt/python/"${PYTHON}"/bin/python -c "import platform;print(platform.platform())"
56+
/opt/python/"${PYTHON}"/bin/pip install "$package_name" --no-index -f file:///io/dist
57+
/opt/python/"${PYTHON}"/bin/pip install pytest
58+
/opt/python/"${PYTHON}"/bin/py.test -vvv /io/test
6059
done
6160

62-
find /io/dist/ -type f -not -name "*$package_name*" -delete
61+
find /io/dist/ -noleaf -type f -not -name "*$package_name*" -delete
6362
rm -rf /io/.eggs
6463
rm -rf /io/build
6564
rm -rf /io/*.egg-info
6665
rm -rf /io/.pytest_cache
66+
rm -rf /io/.tox
67+
rm -f /io/.coverage
68+
# Clean caches and cythonized
69+
find /io/ -noleaf -name *.py[co] -delete
70+
find /io/ -noleaf -name *.c -delete
71+
# Reset permissions
6772
chmod -v a+rwx /io/dist
6873
chmod -v a+rw /io/dist/*
74+
chmod -vR a+rw /io/"$package_name"

0 commit comments

Comments
 (0)