@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
8
8
[project ]
9
9
name = " hpack"
10
- description = " Pure-Python HPACK header compression "
10
+ description = " Pure-Python HPACK header encoding "
11
11
readme = { file = " README.rst" , content-type = " text/x-rst" }
12
12
license = { file = " LICENSE" }
13
13
@@ -46,6 +46,12 @@ classifiers = [
46
46
"Documentation" = " https://python-hyper.org/"
47
47
48
48
[dependency-groups ]
49
+ dev = [
50
+ { include-group = " testing" },
51
+ { include-group = " linting" },
52
+ { include-group = " packaging" },
53
+ { include-group = " docs" },
54
+ ]
49
55
testing = [
50
56
" pytest>=8.3.3,<9" ,
51
57
" pytest-cov>=6.0.0,<7" ,
@@ -103,3 +109,83 @@ source = [
103
109
" src/" ,
104
110
" .tox/**/site-packages/" ,
105
111
]
112
+
113
+ [tool .tox ]
114
+ min_version = " 4.23.2"
115
+ env_list = [ " py39" , " py310" , " py311" , " py312" , " py313" , " pypy3" , " lint" , " docs" , " packaging" ]
116
+
117
+ [tool .tox .gh-actions ]
118
+ python = """
119
+ 3.9: py39, h2spec, lint, docs, packaging
120
+ 3.10: py310
121
+ 3.11: py311
122
+ 3.12: py312
123
+ 3.13: py313
124
+ pypy3: pypy3
125
+ """
126
+
127
+ [tool .tox .env_run_base ]
128
+ pass_env = [
129
+ " GITHUB_*" ,
130
+ ]
131
+ dependency_groups = [" testing" ]
132
+ commands = [
133
+ [" pytest" , " --cov-report=xml" , " --cov-report=term" , " --cov=hpack" , { replace = " posargs" , extend = true }]
134
+ ]
135
+
136
+ [tool .tox .env .pypy3 ]
137
+ # temporarily disable coverage testing on PyPy due to performance problems
138
+ commands = [
139
+ [" pytest" , { replace = " posargs" , extend = true }]
140
+ ]
141
+
142
+ [tool .tox .env .lint ]
143
+ dependency_groups = [" linting" ]
144
+ commands = [
145
+ [" ruff" , " check" , " src/" ],
146
+ [" mypy" , " src/" ],
147
+ ]
148
+
149
+ [tool .tox .env .docs ]
150
+ dependency_groups = [" docs" ]
151
+ allowlist_externals = [" make" ]
152
+ changedir = " {toxinidir}/docs"
153
+ commands = [
154
+ [" make" , " clean" ],
155
+ [" make" , " html" ],
156
+ ]
157
+
158
+ [tool .tox .env .packaging ]
159
+ base_python = [" python39" ]
160
+ dependency_groups = [" packaging" ]
161
+ allowlist_externals = [" rm" ]
162
+ commands = [
163
+ [" rm" , " -rf" , " dist/" ],
164
+ [" check-manifest" ],
165
+ [" python" , " -m" , " build" , " --outdir" , " dist/" ],
166
+ [" twine" , " check" , " dist/*" ],
167
+ ]
168
+
169
+ [tool .tox .env .publish ]
170
+ base_python = " {[tool.tox.env.packaging]base_python}"
171
+ deps = " {[tool.tox.env.packaging]deps}"
172
+ allowlist_externals = " {[tool.tox.env.packaging]allowlist_externals}"
173
+ commands = [
174
+ " {[testenv:packaging]commands}" ,
175
+ [" twine" , " upload" , " dist/*" ],
176
+ ]
177
+
178
+ [tool .tox .env .bench ]
179
+ deps = [
180
+ " {[tool.tox.env]deps}" ,
181
+ " pytest-benchmark==3.2.3" ,
182
+ ]
183
+ commands = [
184
+ [" pytest {toxinidir}/bench/ --benchmark-only --benchmark-group-by=name --benchmark-autosave --benchmark-compare --benchmark-min-rounds=500000" ],
185
+ ]
186
+
187
+ [tool .tox .env .create_test_output ]
188
+ base_python = [" python3.9" ]
189
+ commands = [
190
+ [" python" , " {toxinidir}/utils/create_test_output.py" , { replace = " posargs" , extend = true }],
191
+ ]
0 commit comments