diff --git a/.appveyor.yml b/.appveyor.yml index 1a5123702..0f970d98b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,7 +5,6 @@ cache: build: off environment: PYTHONUNBUFFERED: 1 - VIRTUALENV_DOWNLOAD: no matrix: - TESTENV: py34 - TESTENV: unittests-frozen diff --git a/.travis.yml b/.travis.yml index c0de91338..ddeaa9c1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,9 +45,6 @@ cache: before_install: # We need to do this so we pick up the system-wide python properly - 'export PATH="/usr/bin:$PATH"' - # And this to stop virtualenv from upgrading pip, see - # https://github.com/The-Compiler/qutebrowser/issues/1486 - - 'export VIRTUALENV_DOWNLOAD=no' install: - bash scripts/dev/ci/travis_install.sh diff --git a/misc/requirements/README.md b/misc/requirements/README.md new file mode 100644 index 000000000..66d9290ca --- /dev/null +++ b/misc/requirements/README.md @@ -0,0 +1,2 @@ +This directory contains various `requirements` files which are used by `tox` to +have reproducable tests with pinned versions. diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt new file mode 100644 index 000000000..1fbfb0e14 --- /dev/null +++ b/misc/requirements/requirements-check-manifest.txt @@ -0,0 +1 @@ +check-manifest==0.31 diff --git a/scripts/dev/ci/requirements-codecov.txt b/misc/requirements/requirements-codecov.txt similarity index 100% rename from scripts/dev/ci/requirements-codecov.txt rename to misc/requirements/requirements-codecov.txt diff --git a/misc/requirements/requirements-cxfreeze.txt b/misc/requirements/requirements-cxfreeze.txt new file mode 100644 index 000000000..6e6f1835b --- /dev/null +++ b/misc/requirements/requirements-cxfreeze.txt @@ -0,0 +1 @@ +cx_Freeze==4.3.4 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt new file mode 100644 index 000000000..bfcc594aa --- /dev/null +++ b/misc/requirements/requirements-flake8.txt @@ -0,0 +1,27 @@ +ebb-lint==0.4.4 +flake8==2.5.4 +flake8-copyright==0.1 +flake8-debugger==1.4.0 +flake8-deprecated==1.0 +flake8-docstrings==0.2.6 +flake8-future-import==0.3.2 +flake8-mock==0.2 +flake8-pep3101==0.3 +flake8-putty==0.3.2 +flake8-string-format==0.2.2 +flake8-tidy-imports==1.0.0 +flake8-tuple==0.2.9 +hacking==0.11.0 +intervaltree==2.1.0 +mccabe==0.4.0 +packaging==16.7 +pbr==1.10.0 +pep257==0.7.0 # still needed by flake8-docstrings but ignored +pep8==1.7.0 +pep8-naming==0.3.3 +pydocstyle==1.0.0 +pyflakes==1.2.3 +pyparsing==2.1.4 +six==1.10.0 +sortedcontainers==1.5.2 +venusian==1.0 diff --git a/scripts/dev/ci/requirements-pip.txt b/misc/requirements/requirements-pip.txt similarity index 100% rename from scripts/dev/ci/requirements-pip.txt rename to misc/requirements/requirements-pip.txt diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt new file mode 100644 index 000000000..8518d5aac --- /dev/null +++ b/misc/requirements/requirements-pyinstaller.txt @@ -0,0 +1 @@ +PyInstaller==3.2 diff --git a/misc/requirements/requirements-pylint-master.txt b/misc/requirements/requirements-pylint-master.txt new file mode 100644 index 000000000..762a24dc6 --- /dev/null +++ b/misc/requirements/requirements-pylint-master.txt @@ -0,0 +1,4 @@ +git+https://github.com/PyCQA/astroid.git +git+https://github.com/PyCQA/pylint.git +requests==2.10.0 +./scripts/dev/pylint_checkers diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt new file mode 100644 index 000000000..c8ba0486f --- /dev/null +++ b/misc/requirements/requirements-pylint.txt @@ -0,0 +1,4 @@ +astroid==1.4.5 +pylint==1.5.5 +requests==2.10.0 +./scripts/dev/pylint_checkers diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt new file mode 100644 index 000000000..8200d46be --- /dev/null +++ b/misc/requirements/requirements-pyroma.txt @@ -0,0 +1,2 @@ +pyroma==2.0.2 +docutils==0.12 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt new file mode 100644 index 000000000..c403fcdd7 --- /dev/null +++ b/misc/requirements/requirements-tests.txt @@ -0,0 +1,30 @@ +beautifulsoup4==4.4.1 +coverage==4.1 +decorator==4.0.9 +Flask==0.10.1 # rq.filter: != 0.11.0 +glob2==0.4.1 +httpbin==0.4.1 +hypothesis==3.4.0 +itsdangerous==0.24 +Mako==1.0.4 +parse==1.6.6 +parse-type==0.3.4 +py==1.4.31 +pytest==2.9.1 +pytest-bdd==2.16.1 +pytest-catchlog==1.2.2 +pytest-cov==2.2.1 +pytest-faulthandler==1.3.0 +pytest-mock==1.0.0 +pytest-qt==1.11.0 +pytest-instafail==0.3.0 +pytest-travis-fold==1.2.0 +pytest-repeat==0.2 +pytest-rerunfailures==2.0.0 +pytest-xvfb==0.2.0 +six==1.10.0 +termcolor==1.1.0 +vulture==0.8.1 +Werkzeug==0.11.10 +wheel==0.29.0 +cherrypy==5.4.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt new file mode 100644 index 000000000..033670f83 --- /dev/null +++ b/misc/requirements/requirements-tox.txt @@ -0,0 +1,4 @@ +pluggy==0.3.1 +py==1.4.31 +tox==2.3.1 +virtualenv==15.0.2 diff --git a/misc/requirements/requirements-vulture.txt b/misc/requirements/requirements-vulture.txt new file mode 100644 index 000000000..d8393639c --- /dev/null +++ b/misc/requirements/requirements-vulture.txt @@ -0,0 +1 @@ +vulture==0.8.1 diff --git a/scripts/dev/ci/appveyor_install.py b/scripts/dev/ci/appveyor_install.py index 17cda9876..e15fc75ef 100644 --- a/scripts/dev/ci/appveyor_install.py +++ b/scripts/dev/ci/appveyor_install.py @@ -66,8 +66,8 @@ print("Installing PyQt5...") subprocess.check_call([r'C:\install-PyQt5.exe', '/S']) print("Installing pip/tox") -pip_install(r'-rscripts\dev\ci\requirements-pip.txt') -pip_install(r'-rscripts\dev\ci\requirements-tox.txt') +pip_install(r'-rmisc\requirements\requirements-pip.txt') +pip_install(r'-rmisc\requirements\requirements-tox.txt') print("Linking Python...") with open(r'C:\Windows\system32\python3.bat', 'w') as f: diff --git a/scripts/dev/ci/requirements-tox.txt b/scripts/dev/ci/requirements-tox.txt deleted file mode 100644 index 2b7047276..000000000 --- a/scripts/dev/ci/requirements-tox.txt +++ /dev/null @@ -1,4 +0,0 @@ -pluggy==0.3.1 -py==1.4.31 -tox==2.3.1 -virtualenv==15.0.1 # rq.filter: <= 15.0.1 diff --git a/scripts/dev/ci/travis_install.sh b/scripts/dev/ci/travis_install.sh index b8634d59c..b1e0d35db 100644 --- a/scripts/dev/ci/travis_install.sh +++ b/scripts/dev/ci/travis_install.sh @@ -54,7 +54,7 @@ brew_install() { pip_install() { # this uses python2 - travis_retry sudo -H python -m pip install -r scripts/dev/ci/requirements-$1.txt + travis_retry sudo -H python -m pip install -r misc/requirements/requirements-$1.txt } npm_install() { diff --git a/tox.ini b/tox.ini index 42ba68da0..58594a1ee 100644 --- a/tox.ini +++ b/tox.ini @@ -14,36 +14,7 @@ setenv = passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* deps = -r{toxinidir}/requirements.txt - beautifulsoup4==4.4.1 - coverage==4.1 - decorator==4.0.9 - Flask==0.10.1 # rq.filter: != 0.11.0 - glob2==0.4.1 - httpbin==0.4.1 - hypothesis==3.4.0 - itsdangerous==0.24 - Mako==1.0.4 - parse==1.6.6 - parse-type==0.3.4 - py==1.4.31 - pytest==2.9.1 - pytest-bdd==2.16.1 - pytest-catchlog==1.2.2 - pytest-cov==2.2.1 - pytest-faulthandler==1.3.0 - pytest-mock==1.0.0 - pytest-qt==1.11.0 - pytest-instafail==0.3.0 - pytest-travis-fold==1.2.0 - pytest-repeat==0.2 - pytest-rerunfailures==2.0.0 - pytest-xvfb==0.2.0 - six==1.10.0 - termcolor==1.1.0 - vulture==0.8.1 - Werkzeug==0.11.10 - wheel==0.29.0 - cherrypy==5.4.0 + -r{toxinidir}/misc/requirements/requirements-tests.txt commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m pytest {posargs:tests} @@ -91,7 +62,7 @@ passenv = {[testenv]passenv} skip_install = true deps = {[testenv]deps} - cx_Freeze==4.3.4 + -r{toxinidir}/misc/requirements/requirements-cxfreeze.txt commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build @@ -110,7 +81,7 @@ commands = [testenv:vulture] basepython = python3 -deps = vulture==0.8.1 +deps = -r{toxinidir}/misc/requirements/requirements-vulture.txt commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/dev/run_vulture.py @@ -121,11 +92,7 @@ ignore_errors = true passenv = deps = {[testenv]deps} - {[testenv:misc]deps} - astroid==1.4.5 - pylint==1.5.5 - requests==2.10.0 - ./scripts/dev/pylint_checkers + -r{toxinidir}/misc/requirements/requirements-pylint.txt commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {posargs} @@ -137,10 +104,6 @@ passenv = {[testenv:pylint]passenv} deps = {[testenv]deps} {[testenv:misc]deps} - git+https://github.com/PyCQA/astroid.git - git+https://github.com/PyCQA/pylint.git - requests==2.10.0 - ./scripts/dev/pylint_checkers commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {posargs} @@ -151,34 +114,7 @@ basepython = python3 passenv = deps = -r{toxinidir}/requirements.txt - ebb-lint==0.4.4 - flake8==2.5.4 - flake8-copyright==0.1 - flake8-debugger==1.4.0 - flake8-deprecated==1.0 - flake8-docstrings==0.2.6 - flake8-future-import==0.3.2 - flake8-mock==0.2 - flake8-pep3101==0.3 - flake8-putty==0.3.2 - flake8-string-format==0.2.2 - flake8-tidy-imports==1.0.0 - flake8-tuple==0.2.9 - hacking==0.11.0 - intervaltree==2.1.0 - mccabe==0.4.0 - packaging==16.7 - pbr==1.10.0 - # still needed by flake8-docstrings but ignored - pep257==0.7.0 - pep8==1.7.0 - pep8-naming==0.3.3 - pydocstyle==1.0.0 - pyflakes==1.2.3 - pyparsing==2.1.4 - six==1.10.0 - sortedcontainers==1.5.2 - venusian==1.0 + -r{toxinidir}/misc/requirements/requirements-flake8.txt commands = {envpython} -m flake8 @@ -186,9 +122,7 @@ commands = basepython = python3 skip_install = true passenv = -deps = - pyroma==2.0.2 - docutils==0.12 +deps = -r{toxinidir}/misc/requirements/requirements-pyroma.txt commands = {envdir}/bin/pyroma . @@ -196,8 +130,7 @@ commands = basepython = python3 skip_install = true passenv = -deps = - check-manifest==0.31 +deps = -r{toxinidir}/misc/requirements/requirements-check-manifest.txt commands = {envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__' @@ -221,7 +154,7 @@ basepython = {env:PYTHON:}/python.exe skip_install = true deps = -r{toxinidir}/requirements.txt - cx_Freeze==4.3.4 + -r{toxinidir}/misc/requirements/requirements-cxfreeze.txt commands = {envpython} -m pip install -U setuptools {envpython} scripts/link_pyqt.py --tox {envdir} @@ -232,7 +165,7 @@ basepython = python3 -skip_install = true deps = -r{toxinidir}/requirements.txt - PyInstaller==3.2 + -r{toxinidir}/misc/requirements/requirements-pyinstaller.txt commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envbindir}/pyinstaller --noconfirm misc/qutebrowser.spec