Skip to content

Commit

Permalink
Support Python 3.5 to 3.7 (#157)
Browse files Browse the repository at this point in the history
* Update requirements to compile one per Python version.
* Update tox setup to test with all supported Python versions.
* Update Travis config to use a matrix, with `tox-travis`.
* Update README to say "Python 3.5-3.7 supported."
* Update `classifiers` and `python_requires` in `setup.py`
* Add note in `HISTORY.rst` "Update Python support to 3.5-3.7, as 3.4 has reached its end of life."
  • Loading branch information
adamchainz committed May 13, 2019
1 parent ba7bd90 commit 542c9ff
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 21 deletions.
17 changes: 11 additions & 6 deletions .travis.yml
@@ -1,15 +1,20 @@
sudo: required
dist: xenial
sudo: required

notifications:
email: false

language: python
python: '3.6'
cache: pip

matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7

install:
- sudo apt-get install ghostscript
- pip install tox
script:
- tox
- sudo apt-get install ghostscript
- pip install tox-travis

script: tox
2 changes: 2 additions & 0 deletions HISTORY.rst
Expand Up @@ -6,6 +6,8 @@ History

.. Insert new release notes below this line
* Update Python support to 3.5-3.7, as 3.4 has reached its end of life.

3.0.0 (2019-05-08)
------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -22,7 +22,7 @@ Install from **pip**:
pip install treepoem
Python 3.4+ supported.
Python 3.5-3.7 supported.

You'll also need Ghostscript installed. On Ubuntu/Debian this can be installed
with:
Expand Down
6 changes: 6 additions & 0 deletions requirements-compile.sh
@@ -0,0 +1,6 @@
#!/bin/sh
set -ex
export CUSTOM_COMPILE_COMMAND="./requirements-compile.sh"
python3.5 -m piptools compile "$@" -o requirements/py35.txt
python3.6 -m piptools compile "$@" -o requirements/py36.txt
python3.7 -m piptools compile "$@" -o requirements/py37.txt
26 changes: 26 additions & 0 deletions requirements/py35.txt
@@ -0,0 +1,26 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# ./requirements-compile.sh
#
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
docutils==0.14
entrypoints==0.3 # via flake8
flake8-commas==2.0.0
flake8==3.7.7
isort==4.3.19
mccabe==0.6.1 # via flake8
more-itertools==7.0.0 # via pytest
multilint==3.0.0
pathlib2==2.3.3 # via pytest
pillow==6.0.0
pluggy==0.11.0 # via pytest
py==1.8.0 # via pytest
pycodestyle==2.5.0 # via flake8
pyflakes==2.1.1 # via flake8
pygments==2.4.0
pytest==4.5.0
six==1.12.0 # via pathlib2, pytest
wcwidth==0.1.7 # via pytest
11 changes: 6 additions & 5 deletions requirements.txt → requirements/py36.txt
Expand Up @@ -2,23 +2,24 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# __main__.py compile -r -U
# ./requirements-compile.sh
#
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
docutils==0.14
entrypoints==0.3 # via flake8
flake8-commas==2.0.0
flake8==3.7.7
isort==4.3.18
isort==4.3.19
mccabe==0.6.1 # via flake8
more-itertools==7.0.0 # via pytest
multilint==2.4.0
multilint==3.0.0
pillow==6.0.0
pluggy==0.11.0 # via pytest
py==1.8.0 # via pytest
pycodestyle==2.5.0 # via flake8
pyflakes==2.1.1 # via flake8
pygments==2.4.0
pytest==4.4.1
six==1.12.0 # via multilint, pytest
pytest==4.5.0
six==1.12.0 # via pytest
wcwidth==0.1.7 # via pytest
25 changes: 25 additions & 0 deletions requirements/py37.txt
@@ -0,0 +1,25 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# ./requirements-compile.sh
#
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
docutils==0.14
entrypoints==0.3 # via flake8
flake8-commas==2.0.0
flake8==3.7.7
isort==4.3.19
mccabe==0.6.1 # via flake8
more-itertools==7.0.0 # via pytest
multilint==3.0.0
pillow==6.0.0
pluggy==0.11.0 # via pytest
py==1.8.0 # via pytest
pycodestyle==2.5.0 # via flake8
pyflakes==2.1.1 # via flake8
pygments==2.4.0
pytest==4.5.0
six==1.12.0 # via pytest
wcwidth==0.1.7 # via pytest
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -38,7 +38,7 @@ def get_version(filename):
install_requires=[
'Pillow',
],
python_requires='>=3.4',
python_requires='>=3.5',
license="MIT",
zip_safe=False,
keywords='barcode bwipp postscript ghostscript qr qrcode aztec azteccode pdf417 interleaved2of5 i25 code128 code39',
Expand All @@ -48,9 +48,8 @@ def get_version(filename):
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)
19 changes: 13 additions & 6 deletions tox.ini
@@ -1,15 +1,22 @@
[tox]
envlist =
py3,
py3-codestyle
py{35,36,37},
py37-codestyle

[testenv]
install_command = pip install --no-deps {opts} {packages}
deps =
-rrequirements.txt
commands = pytest {posargs}

[testenv:py3-codestyle]
changedir = {toxinidir}
[testenv:py35]
deps = -rrequirements/py35.txt

[testenv:py36]
deps = -rrequirements/py36.txt

[testenv:py37]
deps = -rrequirements/py37.txt

[testenv:py37-codestyle]
deps = -rrequirements/py37.txt
skip_install = true
commands = multilint

0 comments on commit 542c9ff

Please sign in to comment.