Skip to content

Commit cd6cc14

Browse files
authored
Merge pull request #145 from CoolCat467/switch-to-pyproject
Move all configuration to pyproject.toml
2 parents f03160a + 340d3fd commit cd6cc14

File tree

5 files changed

+95
-63
lines changed

5 files changed

+95
-63
lines changed

.coveragerc

-9
This file was deleted.

ci.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ function curl-harder() {
2323
}
2424

2525

26-
python -m pip install -U pip setuptools wheel
26+
python -m pip install -U pip build
2727
python -m pip --version
2828

29-
python setup.py sdist --formats=zip
30-
python -m pip install dist/*.zip
29+
python -m build
30+
python -m pip install dist/*.whl
3131

3232
if [ "$CHECK_FORMATTING" = "1" ]; then
3333
pip install black

pyproject.toml

+91
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,98 @@
1+
[build-system]
2+
requires = ["setuptools >= 64"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pytest-trio"
7+
dynamic = ["version"]
8+
authors = [
9+
{ name="Emmanuel Leblond", email="[email protected]" },
10+
]
11+
description = "Pytest plugin for trio"
12+
readme = {file = "README.md", content-type = "text/markdown"}
13+
license = {file = "LICENSE"}
14+
requires-python = ">=3.8"
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"License :: OSI Approved :: MIT License",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Natural Language :: English",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: Implementation :: CPython",
28+
"Programming Language :: Python :: Implementation :: PyPy",
29+
"Operating System :: POSIX :: Linux",
30+
"Operating System :: MacOS :: MacOS X",
31+
"Operating System :: Microsoft :: Windows",
32+
"Operating System :: OS Independent",
33+
"Topic :: System :: Networking",
34+
"Topic :: Software Development :: Testing",
35+
"Framework :: Hypothesis",
36+
"Framework :: Pytest",
37+
"Framework :: Trio",
38+
]
39+
keywords = [
40+
"async",
41+
"pytest",
42+
"testing",
43+
"trio",
44+
]
45+
dependencies = [
46+
"trio >= 0.25.1", # for upstream Hypothesis integration
47+
"outcome >= 1.1.0",
48+
"pytest >= 7.2.0", # for ExceptionGroup support
49+
]
50+
51+
[tool.setuptools.dynamic]
52+
version = {attr = "pytest_trio._version.__version__"}
53+
54+
[project.urls]
55+
"Homepage" = "https://github.com/python-trio/pytest-trio"
56+
"Source" = "https://github.com/python-trio/pytest-trio"
57+
"Bug Tracker" = "https://github.com/python-trio/pytest-trio/issues"
58+
59+
[project.entry-points.pytest11]
60+
trio = "pytest_trio.plugin"
61+
62+
[tool.setuptools.packages]
63+
find = {namespaces = false}
64+
165
[tool.towncrier]
266
package = "pytest_trio"
367
filename = "docs/source/history.rst"
468
directory = "newsfragments"
569
title_format = "pytest-trio {version} ({project_date})"
670
underlines = ["-", "~", "^"]
771
issue_format = "`#{issue} <https://github.com/python-trio/pytest-trio/issues/{issue}>`__"
72+
73+
[tool.coverage.run]
74+
branch = true
75+
source_pkgs = ["pytest_trio"]
76+
77+
[tool.coverage.report]
78+
precision = 1
79+
skip_covered = true
80+
exclude_lines = [
81+
"pragma: no cover",
82+
"abc.abstractmethod",
83+
"if TYPE_CHECKING.*:",
84+
"if _t.TYPE_CHECKING:",
85+
"if t.TYPE_CHECKING:",
86+
"@overload",
87+
'class .*\bProtocol\b.*\):',
88+
"raise NotImplementedError",
89+
]
90+
partial_branches = [
91+
"pragma: no branch",
92+
"if not TYPE_CHECKING:",
93+
"if not _t.TYPE_CHECKING:",
94+
"if not t.TYPE_CHECKING:",
95+
"if .* or not TYPE_CHECKING:",
96+
"if .* or not _t.TYPE_CHECKING:",
97+
"if .* or not t.TYPE_CHECKING:",
98+
]

pytest_trio/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# This file is imported from __init__.py and exec'd from setup.py
1+
# This file is imported from __init__.py and parsed by setuptools
22

33
__version__ = "0.8.0+dev"

setup.py

-50
This file was deleted.

0 commit comments

Comments
 (0)