Skip to content

Commit

Permalink
Try to unbreak Python 2.6 builds (for whatever it's still worth)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Oct 20, 2018
1 parent e0fd39d commit be8b972
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
25 changes: 25 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a pip constraints file that is used to preserve Python 2.6
# compatibility (on Travis CI). Why I'm still doing that in 2018 is
# a good question, maybe simply to prove that I can :-P.

# flake8 3.0.0 drops explicit support for Python 2.6:
# http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
flake8 < 3.0.0 ; python_version < '2.7'

# flake8-docstrings 1.0.0 switches from pep257 to pydocstyle and I haven't been
# able to find a combination of versions of flake8-docstrings and pydocstyle
# that actually works on Python 2.6. Here's the changelog:
# https://gitlab.com/pycqa/flake8-docstrings/blob/master/HISTORY.rst
flake8-docstrings < 1.0.0 ; python_version < '2.7'

# pyflakes 2.0.0 drops Python 2.6 compatibility:
# https://github.com/PyCQA/pyflakes/blob/master/NEWS.txt
pyflakes < 2.0.0 ; python_version < '2.7'

# pytest 3.3 drops Python 2.6 compatibility:
# https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23
pytest < 3.3 ; python_version < '2.7'

# pycparser < 2.19 drops Python 2.6 compatibility:
# https://github.com/eliben/pycparser/blob/master/CHANGES
pycparser < 2.19 ; python_version < '2.7'
4 changes: 4 additions & 0 deletions requirements-travis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--requirement=requirements-checks.txt
--requirement=requirements-tests.txt
--requirement=requirements.txt
coveralls
8 changes: 2 additions & 6 deletions scripts/install-on-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ echo HRNGDEVICE=/dev/urandom | sudo tee /etc/default/rng-tools
sudo /etc/init.d/rng-tools restart

# Install the required Python packages.
pip install pip-accel
pip-accel install coveralls
pip-accel install --requirement=requirements.txt
pip-accel install --requirement=requirements-checks.txt
pip-accel install --requirement=requirements-tests.txt
pip install --constraint=constraints.txt --requirement=requirements-travis.txt

# Install the project itself, making sure that potential character encoding
# and/or decoding errors in the setup script are caught as soon as possible.
LC_ALL=C pip-accel install .
LC_ALL=C pip install .

0 comments on commit be8b972

Please sign in to comment.