@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77
88[project ]
99name = " hyperframe"
10- description = " HTTP/2 framing layer for Python "
10+ description = " Pure-Python HTTP/2 framing"
1111readme = { file = " README.rst" , content-type = " text/x-rst" }
1212license = { file = " LICENSE" }
1313
@@ -46,6 +46,13 @@ classifiers = [
4646"Documentation" = " https://python-hyper.org/"
4747
4848[dependency-groups ]
49+ dev = [
50+ { include-group = " testing" },
51+ { include-group = " linting" },
52+ { include-group = " packaging" },
53+ { include-group = " docs" },
54+ ]
55+
4956testing = [
5057 " pytest>=8.3.3,<9" ,
5158 " pytest-cov>=6.0.0,<7" ,
@@ -105,3 +112,68 @@ source = [
105112 " src/" ,
106113 " .tox/**/site-packages/" ,
107114]
115+
116+ [tool .tox ]
117+ min_version = " 4.23.2"
118+ env_list = [ " py39" , " py310" , " py311" , " py312" , " py313" , " pypy3" , " lint" , " docs" , " packaging" ]
119+
120+ [tool .tox .gh-actions ]
121+ python = """
122+ 3.9: py39, h2spec, lint, docs, packaging
123+ 3.10: py310
124+ 3.11: py311
125+ 3.12: py312
126+ 3.13: py313
127+ pypy3: pypy3
128+ """
129+
130+ [tool .tox .env_run_base ]
131+ pass_env = [
132+ " GITHUB_*" ,
133+ ]
134+ dependency_groups = [" testing" ]
135+ commands = [
136+ [" pytest" , " --cov-report=xml" , " --cov-report=term" , " --cov=hyperframe" , { replace = " posargs" , extend = true }]
137+ ]
138+
139+ [tool .tox .env .pypy3 ]
140+ # temporarily disable coverage testing on PyPy due to performance problems
141+ commands = [
142+ [" pytest" , { replace = " posargs" , extend = true }]
143+ ]
144+
145+ [tool .tox .env .lint ]
146+ dependency_groups = [" linting" ]
147+ commands = [
148+ [" ruff" , " check" , " src/" ],
149+ [" mypy" , " src/" ],
150+ ]
151+
152+ [tool .tox .env .docs ]
153+ dependency_groups = [" docs" ]
154+ allowlist_externals = [" make" ]
155+ changedir = " {toxinidir}/docs"
156+ commands = [
157+ [" make" , " clean" ],
158+ [" make" , " html" ],
159+ ]
160+
161+ [tool .tox .env .packaging ]
162+ base_python = [" python39" ]
163+ dependency_groups = [" packaging" ]
164+ allowlist_externals = [" rm" ]
165+ commands = [
166+ [" rm" , " -rf" , " dist/" ],
167+ [" check-manifest" ],
168+ [" python" , " -m" , " build" , " --outdir" , " dist/" ],
169+ [" twine" , " check" , " dist/*" ],
170+ ]
171+
172+ [tool .tox .env .publish ]
173+ base_python = " {[tool.tox.env.packaging]base_python}"
174+ deps = " {[tool.tox.env.packaging]deps}"
175+ allowlist_externals = " {[tool.tox.env.packaging]allowlist_externals}"
176+ commands = [
177+ " {[testenv:packaging]commands}" ,
178+ [" twine" , " upload" , " dist/*" ],
179+ ]
0 commit comments