Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
qtile/tox.ini
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
142 lines (131 sloc)
4.34 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tox] | |
skip_missing_interpreters = True | |
skipsdist=True | |
minversion = 1.8 | |
envlist = | |
pypy3, | |
py39, | |
py310, | |
py311, | |
docs, | |
pep8, | |
codestyle, | |
docstyle, | |
mypy, | |
packaging, | |
vulture | |
[testenv] | |
# This is required in order to get UTF-8 output inside of the subprocesses | |
# that our tests use. | |
setenv = LC_CTYPE = en_US.UTF-8 | |
# Pass Display down to have it for the tests available | |
passenv = DISPLAY WAYLAND_DISPLAY | |
whitelist_externals=convert | |
# xcffib has to be installed before cairocffi | |
deps = | |
pytest >= 6.2.1 | |
coverage | |
setuptools >= 40.5.0 | |
bowler | |
xkbcommon >= 0.3 | |
pywayland >= 0.4.14 | |
dbus-next | |
PyGObject | |
# pywayland has to be installed before pywlroots | |
commands = | |
# cffi's binary wheel is incompatible with some libffi libraries so we force build here | |
# See: https://github.com/Kozea/cairocffi/issues/202 | |
!pypy3: pip install --force-reinstall --no-binary :all: cffi | |
# However, rebuilding on pypy doesn't work so we'll pin the version instead | |
# See: https://github.com/tych0/xcffib/issues/134 | |
pypy3: pip install cffi==1.15.0 | |
pip install xcffib>=0.10.1 wheel | |
# The 1.5.0 release of cairocffi cannot be built in a clean folder as it will fail to | |
# to build with xcb suppport. https://github.com/Kozea/cairocffi/issues/212 | |
pip install --no-cache --upgrade --no-build-isolation cairocffi | |
pip install pywlroots>=0.15.24,<0.16.0 | |
python3 setup.py -q install | |
{toxinidir}/scripts/ffibuild | |
# py310 currently fails with -W error, see: https://gitlab.gnome.org/GNOME/pygobject/-/issues/476 | |
# pypy3 is very slow when running coverage reports so we skip it | |
pypy3: python3 -m pytest -W error --backend=x11 --backend=wayland {posargs} | |
py39: coverage run -m pytest -W error --backend=x11 --backend=wayland {posargs} | |
py310: coverage run -m pytest --backend=x11 --backend=wayland {posargs} | |
# dbus-next 0.2.3 causes a segfault when run in GLib's mainloop in python 3.11 | |
# We need to skip the `test_statusnotifier` tests until 0.2.4 is released | |
# https://github.com/altdesktop/python-dbus-next/issues/138 | |
py311: coverage run -m pytest --backend=x11 --backend=wayland -k "not test_statusnotifier" {posargs} | |
# Coverage runs tests in parallel so we need to combine results into a single file | |
!pypy3: coverage combine -q | |
# Include a text summary in the build log | |
!pypy3: coverage report -m | |
# Create an xml summary to be submitted to coveralls.io | |
!pypy3: coverage xml | |
[testenv:packaging] | |
deps = | |
check-manifest | |
twine | |
commands = | |
check-manifest | |
python3 setup.py check -m -s | |
python3 setup.py sdist | |
twine check dist/* | |
[testenv:pep8] | |
deps = | |
flake8 | |
flake8-black>=0.2.4 | |
flake8-isort | |
flake8-tidy-imports | |
flake8-logging-format | |
pep8-naming | |
commands = | |
flake8 {toxinidir}/libqtile {toxinidir}/bin/ {toxinidir}/test {toxinidir}/docs --exclude=test/configs/syntaxerr.py,**/_ffi*.py,docs/_build/ | |
[testenv:codestyle] | |
deps = | |
pycodestyle >= 2.7 | |
skip_install = true | |
commands = | |
pycodestyle --max-line-length=98 --exclude="_*.py" --ignore=E203,E501,W503 {toxinidir}/libqtile | |
[testenv:docstyle] | |
deps = | |
pydocstyle >= 5.0 | |
skip_install = true | |
commands = | |
- pydocstyle --match "(?!(test)?_).*\.py" libqtile/ | |
[testenv:mypy] | |
deps = | |
mypy == 0.960 | |
bowler | |
dbus-next | |
PyGObject | |
pytest >= 6.2.1 | |
types-python-dateutil | |
types-pytz | |
types-pkg_resources | |
commands = | |
pip install --ignore-installed xcffib wheel | |
pip install --ignore-installed --no-cache --upgrade --no-build-isolation cairocffi | |
pip install pywayland>=0.4.14 xkbcommon>=0.3 | |
pip install pywlroots>=0.15.24,<0.16.0 | |
mypy -p libqtile | |
# also run the tests that require mypy | |
pip install --no-build-isolation . | |
{toxinidir}/scripts/ffibuild | |
# py310 currently fails with -W error, see: https://gitlab.gnome.org/GNOME/pygobject/-/issues/476 | |
python3 -m pytest -- test/test_check.py test/test_migrate.py | |
[testenv:docs] | |
deps = -r{toxinidir}/docs/requirements.txt | |
commands = | |
pip install -r{toxinidir}/requirements.txt | |
python3 setup.py build_sphinx -W | |
[testenv:vulture] | |
deps = | |
vulture | |
commands = | |
vulture --min-confidence=100 --exclude test/configs/syntaxerr.py libqtile test | |
[gh-actions] | |
python = | |
pypy-3.9: pypy3 | |
3.9: py39, mypy | |
3.10: py310, mypy | |
3.11: py311, mypy, packaging, pep8, codestyle, docstyle, vulture |