Skip to content

Commit

Permalink
bugfixes; renames
Browse files Browse the repository at this point in the history
  • Loading branch information
jmadler committed Nov 27, 2020
1 parent 32eaaaa commit c4689c2
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
15 changes: 5 additions & 10 deletions .travis.yml
@@ -1,16 +1,11 @@
language: generic
before_script:
# Run flake8 tests only on Python 2.7 and 3.7...
# 1) stop the build if there are Python syntax errors or undefined names
# 2) exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- if [[ $TRAVIS_PYTHON_VERSION == *.7 ]]; then
pip install flake8;
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics;
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics;
fi

services:
- docker

before_script:
- docker pull jmadler/python-future-builder:latest

script:
- ./buildtest.sh
- ./lint.sh
- ./build.sh
8 changes: 4 additions & 4 deletions Dockerfile
Expand Up @@ -9,10 +9,10 @@ RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-instal
RUN echo export PATH="/opt/pyenv/bin:$PATH" >> ~/.bashrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
# venv 15.2.0 is the last to support Python 2.6. Since the venv module of the installer
# venv 15.2.0 is the last to support Python 2.6.
RUN pip3 install virtualenv==15.2.0
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 2.6.9
RUN virtualenv /opt/py26 --python /opt/pyenv/versions/2.6.9/bin/python
RUN virtualenv /root/py26 --python /opt/pyenv/versions/2.6.9/bin/python
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.3.7
RUN virtualenv /root/py33 --python /opt/pyenv/versions/3.3.7/bin/python
RUN pip3 install virtualenv==20.0.21
Expand All @@ -29,8 +29,8 @@ RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.7.7
RUN virtualenv /root/py37 --python /opt/pyenv/versions/3.7.7/bin/python
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.8.3
RUN virtualenv /root/py38 --python /opt/pyenv/versions/3.8.3/bin/python
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.9-dev
RUN virtualenv /root/py39 --python /opt/pyenv/versions/3.9-dev/bin/python
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.9.0
RUN virtualenv /root/py39 --python /opt/pyenv/versions/3.9.0/bin/python
RUN ln -s /usr/bin/python3 /usr/bin/python
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand Down
14 changes: 14 additions & 0 deletions build.sh
@@ -0,0 +1,14 @@
# XXX: TODO: we should make this include -e once tests pass
set -xuo pipefail

docker build . -t jmadler/python-future-builder

version=0.18.2

for i in py26 py27 py33 py34 py35 py36 py37 py38 py39; do
docker run -ti -v $(realpath dist):/root/python-future/dist python-future-builder /root/python-future/setup.sh $version $(basename $i)
done

python setup.py sdist
python setup.py clean
echo You may now run: "twine upload dist/*"
12 changes: 0 additions & 12 deletions buildtest.sh

This file was deleted.

3 changes: 3 additions & 0 deletions lint.sh
@@ -0,0 +1,3 @@
# Run under Python 2.7 and 3.7
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3 changes: 1 addition & 2 deletions setup.sh
Expand Up @@ -6,7 +6,7 @@ version=$1
pytag=$2

if [ $pytag = 'py33' ]; then
pip install virtualenv==16.2.0
pip3 install virtualenv==16.2.0
fi

source /root/$pytag/bin/activate
Expand All @@ -18,4 +18,3 @@ pip install pytest unittest2
python setup.py bdist_wheel --python-tag=$pytag
pip install dist/future-$version-$pytag-none-any.whl
pytest tests/
python setup.py clean

0 comments on commit c4689c2

Please sign in to comment.