diff --git a/build.sh b/build.sh index 4fa388b1..d4b92d9a 100755 --- a/build.sh +++ b/build.sh @@ -1,15 +1,16 @@ +#!/bin/sh # XXX: TODO: we should make this include -e once tests pass -set -xuo pipefail +set -xu DOCKER_IMAGE=jmadler/python-future-builder # XXX: TODO: Perhaps this version shouldn't be hardcoded version=0.18.4 -docker build . -t $DOCKER_IMAGE -#docker push $DOCKER_IMAGE:latest +docker build . -t "$DOCKER_IMAGE" +#docker push "$DOCKER_IMAGE:latest" for i in cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39; do - docker run -ti -v $(realpath dist):/root/python-future/dist $DOCKER_IMAGE /root/python-future/setup.sh $version $(basename $i) + docker run -ti -v "$(realpath dist)":/root/python-future/dist "$DOCKER_IMAGE" /root/python-future/setup.sh "$version" $(basename $i) done python setup.py sdist diff --git a/lint.sh b/lint.sh index 667b258f..b3c41cd4 100755 --- a/lint.sh +++ b/lint.sh @@ -1,3 +1,4 @@ +#!/bin/sh # TODO: Run under Python 2.7 and 3.7 flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics || true flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true diff --git a/setup.sh b/setup.sh index 047dd953..fa89d431 100755 --- a/setup.sh +++ b/setup.sh @@ -1,15 +1,21 @@ -#!/bin/bash +#!/bin/sh -set -exo pipefail +set -ex version=$1 -pyabitag=$2 - -py="/opt/python/${pyabitag}/bin/python" -pytag=${pyabitag%-*} -pytag="${pytag//cp/py}" -$py -m pip install pytest unittest2 -$py setup.py bdist_wheel --python-tag=$pytag -$py -m pip install dist/future-$version-$pytag-none-any.whl +pytag=$2 + +if [ "$pytag" = 'py33' ]; then + pip3 install virtualenv==16.2.0 +fi + +. /root/"$pytag"/bin/activate + +if [ "$pytag" = 'py26' ]; then + pip install importlib +fi +pip install pytest unittest2 +python setup.py bdist_wheel --python-tag="$pytag" +pip install "dist/future-$version-$pytag-none-any.whl" # Ignore test failures for now -$py -m pytest tests/ || true +pytest tests/ || true