Skip to content

Commit 0cdc7cb

Browse files
committed
One last desperate attempt to cling on to Python 2.6 :-P
1 parent bc88b14 commit 0cdc7cb

File tree

7 files changed

+49
-23
lines changed

7 files changed

+49
-23
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for the `rotate-backups' package.
22
#
33
# Author: Peter Odding <peter@peterodding.com>
4-
# Last Change: March 25, 2018
4+
# Last Change: August 2, 2018
55
# URL: https://github.com/xolox/python-rotate-backups
66

77
PACKAGE_NAME = rotate-backups
@@ -41,7 +41,8 @@ reset:
4141
$(MAKE) install
4242

4343
check: install
44-
@scripts/check-code-style.sh
44+
@pip-accel install --upgrade --quiet --requirement=requirements-checks.txt
45+
@flake8
4546

4647
test: install
4748
@pip-accel install --quiet --requirement=requirements-tests.txt

constraints.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This is a pip constraints file that is used to preserve Python 2.6
2+
# compatibility (on Travis CI). Why I'm still doing that in 2018 is
3+
# a good question, maybe simply to prove that I can :-P.
4+
5+
# flake8 3.0.0 drops explicit support for Python 2.6:
6+
# http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
7+
flake8 < 3.0.0 ; python_version < '2.7'
8+
9+
# flake8-docstrings 1.0.0 switches from pep257 to pydocstyle and I haven't been
10+
# able to find a combination of versions of flake8-docstrings and pydocstyle
11+
# that actually works on Python 2.6. Here's the changelog:
12+
# https://gitlab.com/pycqa/flake8-docstrings/blob/master/HISTORY.rst
13+
flake8-docstrings < 1.0.0 ; python_version < '2.7'
14+
15+
# pyflakes 2.0.0 drops Python 2.6 compatibility:
16+
# https://github.com/PyCQA/pyflakes/blob/master/NEWS.txt
17+
pyflakes < 2.0.0 ; python_version < '2.7'
18+
19+
# pytest 3.3 drops Python 2.6 compatibility:
20+
# https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23
21+
pytest < 3.3 ; python_version < '2.7'
22+
23+
# simpleeval 0.9.2 introduces syntax that's incompatible with Python 2.6.
24+
simpleeval < 0.9.2 ; python_version < '2.7'

requirements-checks.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Python packages required to run `make check'.
2+
3+
# Enable Python version compatibility.
4+
--constraints=constraints.txt
5+
26
flake8 >= 2.6.0
37
flake8-docstrings >= 0.2.8
48
pyflakes >= 1.2.3

requirements-tests.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
pytest >= 3.0.7, < 3.3.0 ; python_version > '2.6'
2-
pytest-cov >= 2.2.1
1+
# Python packages required to run `make test'.
2+
3+
# Enable Python version compatibility.
4+
--constraints=constraints.txt
35

4-
# pytest release 3.3 drops Python 2.6 compatibility:
5-
# https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23
6-
pytest < 3.3 ; python_version < '2.7'
6+
pytest >= 3.0.7
7+
pytest-cov >= 2.2.1

requirements-travis.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1+
# Python packages required on Travis CI.
2+
3+
# Enable Python version compatibility.
4+
--constraints=constraints.txt
5+
6+
# Pull in the requirements for code style checks,
7+
# the test suite and installation requirements.
18
--requirement=requirements-checks.txt
29
--requirement=requirements-tests.txt
310
--requirement=requirements.txt
11+
12+
# Prepare to submit coverage data.
413
coveralls

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# Installation requirements (see also constraints.txt).
2+
13
coloredlogs >= 5.1
24
executor >= 19.2
35
humanfriendly >= 3.4
46
naturalsort >= 1.4
57
property-manager >= 2.3
68
python-dateutil >= 2.2
7-
# simpleeval version 0.9.2 introduces syntax that is incompatible with Python 2.6.
8-
simpleeval >= 0.8.7, < 0.9.2
9+
simpleeval >= 0.8.7
910
six >= 1.9.0
1011
update-dotdee >= 5.0
1112
verboselogs >= 1.5

scripts/check-code-style.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)