blob: 206bf6840d4770f778a0917e883838ab1a1c927d (
plain)
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
|
#!/bin/bash
set -e
set -x
if [[ -n "$PYENV_VERSION" ]]; then
eval "$(pyenv init -)"
fi
if [[ -n "$PYPY_URL" ]]; then
cmd=./pypy
else
cmd=python
fi
"$cmd" setup.py build_ext -i
"$cmd" -m compileall -f .
"$cmd" setup.py test
if [[ -n "$PYENV_VERSION" && "$TRAVIS_OS_NAME" == 'osx' ]]; then
python setup.py bdist_wheel
fi
if [[ "$BUILD_SDIST" == 'true' ]]; then
"$cmd" setup.py sdist --formats=gztar
# Ensure the package installs from tarball correctly.
filename=$("$cmd" setup.py --fullname)
pip install "dist/$filename.tar.gz"
fi
|