Skip to content

Commit 811c53a

Browse files
committed
move tox settings into pyproject.toml for use with hatch
1 parent 6dccaec commit 811c53a

2 files changed

Lines changed: 34 additions & 77 deletions

File tree

pyproject.toml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,37 @@ repository = "https://github.com/sphinx-contrib/spelling"
4646
source = "vcs"
4747
path = "sphinxcontrib/spelling/version.py"
4848

49-
[tool.hatch.build]
50-
packages = ["sphinxcontrib.spelling"]
49+
[tool.hatch.build.targets.sdist]
50+
exclude = [".github", "cover", ".mergify.yml", ".gitignore"]
51+
[tool.hatch.build.targets.wheel]
52+
only-include = ["sphinxcontrib"]
53+
54+
[tool.hatch.envs.docs]
55+
dependencies = ["sphinx"]
56+
[tool.hatch.envs.docs.env]
57+
ENABLE_SPELLING = "1"
58+
[tool.hatch.envs.docs.scripts]
59+
build = [
60+
"sphinx-build -W -j auto -b html -d docs/build/doctrees docs/source docs/build/html",
61+
"sphinx-build -W -j auto -b linkcheck -d docs/build/doctrees docs/source docs/build/linkcheck",
62+
"sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling",
63+
]
64+
check = "sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling"
65+
66+
[tool.hatch.envs.test]
67+
dependencies = [
68+
"pytest",
69+
"pytest-cov",
70+
"coverage!=4.4,>=4.0",
71+
"ruff",
72+
"twine",
73+
"check-python-versions",
74+
]
75+
[tool.hatch.envs.test.scripts]
76+
test = "python -m pytest --cov=sphinxcontrib.spelling --cov-report term-missing --log-level DEBUG tests"
77+
lint = "ruff check sphinxcontrib integration_tests tests"
78+
pkglint = [
79+
"hatch build",
80+
"twine check dist/*.tar.gz dist/*.whl",
81+
"check-python-versions --only pyproject.toml,.github/workflows/test.yml",
82+
]

tox.ini

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

0 commit comments

Comments
 (0)