Merge pull request #1077 from bluetech/tox-tweak

Some tox/build/config tweaks
This commit is contained in:
Ran Benita
2024-04-29 10:09:07 +03:00
committed by GitHub
3 changed files with 17 additions and 41 deletions

View File

@@ -1,5 +0,0 @@
exclude .appveyor.yml
exclude .gitignore
exclude .pre-commit-config.yaml
exclude .travis.yml
prune .github

View File

@@ -54,18 +54,15 @@ testing = ["filelock"]
psutil = ["psutil>=3.0"] psutil = ["psutil>=3.0"]
setproctitle = ["setproctitle"] setproctitle = ["setproctitle"]
[tool.setuptools]
zip-safe = false
platforms = [
"linux",
"osx",
"win32",
]
include-package-data = false
[tool.setuptools_scm] [tool.setuptools_scm]
write_to = "src/xdist/_version.py" write_to = "src/xdist/_version.py"
[tool.pytest.ini_options]
# pytest-services also defines a worker_id fixture, disable
# it so they don't conflict with each other (#611).
addopts = "-ra -p no:pytest-services"
testpaths = ["testing"]
[tool.ruff] [tool.ruff]
src = ["src"] src = ["src"]

38
tox.ini
View File

@@ -1,34 +1,26 @@
[tox] [tox]
envlist= envlist =
linting linting
py{38,39,310,311,312}-pytestlatest py{38,39,310,311,312}-pytestlatest
py310-pytestmain py310-pytestmain
py310-psutil py310-psutil
py310-setproctitle py310-setproctitle
isolated_build = true isolated_build = true
[testenv] [testenv]
extras = testing extras =
testing
psutil: psutil
setproctitle: setproctitle
deps = deps =
pytestmin: pytest==7.0.0 pytestmin: pytest==7.0.0
pytestlatest: pytest pytestlatest: pytest
pytestmain: git+https://github.com/pytest-dev/pytest.git pytestmain: git+https://github.com/pytest-dev/pytest.git
commands=
pytest {posargs}
[testenv:py310-psutil]
extras =
testing
psutil
commands = commands =
pytest {posargs:-k psutil} pytest {posargs:{env:_XDIST_TOX_DEFAULT_POSARGS:}}
setenv =
[testenv:py310-setproctitle] _XDIST_TOX_DEFAULT_POSARGS={env:_XDIST_TOX_POSARGS_PSUTIL:}
extras = psutil: _XDIST_TOX_POSARGS_PSUTIL=-k psutil
testing
setproctitle
deps = pytest
commands =
pytest {posargs}
[testenv:linting] [testenv:linting]
skip_install = True skip_install = True
@@ -39,9 +31,8 @@ deps =
commands = pre-commit run --all-files --show-diff-on-failure commands = pre-commit run --all-files --show-diff-on-failure
[testenv:release] [testenv:release]
changedir= changedir =
description = do a release, required posarg of the version number description = do a release, required posarg of the version number
basepython = python3.10
skipsdist = True skipsdist = True
usedevelop = True usedevelop = True
passenv = * passenv = *
@@ -51,16 +42,9 @@ commands =
towncrier build --version {posargs} --yes towncrier build --version {posargs} --yes
[testenv:docs] [testenv:docs]
basepython = python3.10
usedevelop = True usedevelop = True
deps = deps =
sphinx sphinx
sphinx_rtd_theme sphinx_rtd_theme
commands = commands =
sphinx-build -W --keep-going -b html docs docs/_build/html {posargs:} sphinx-build -W --keep-going -b html docs docs/_build/html {posargs:}
[pytest]
# pytest-services also defines a worker_id fixture, disable
# it so they don't conflict with each other (#611).
addopts = -ra -p no:pytest-services
testpaths = testing