-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
130 lines (114 loc) · 3.04 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[build-system]
requires = ["hatchling", "hatch-regex-commit"]
build-backend = "hatchling.build"
[project]
name = "hatch-cextensions"
description = 'This provides a build-hook plugin for Hatch that allows building of C Extensions using setuptools during Hatch build.'
readme = "README.md"
requires-python = ">=3.7"
license = {file = "LICENSE"}
keywords = []
authors = [
{ name = "Marcin Morys", email = "[email protected]" },
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = []
dynamic = ["version"]
[project.entry-points.hatch]
cextension = "hatch_cextensions.hooks"
[project.urls]
Documentation = "https://github.com/myusername/hatch-cextensions#readme"
Source = "https://github.com/myusername/hatch-cextensions"
[tool.hatch.version]
source = "regex_commit"
tag_sign = false
path = "src/hatch_cextensions/__about__.py"
[tool.hatch.envs.default]
dependencies = [
"hatchling",
"pytest",
"pytest-cov",
"pytest-xdist",
"pytest-randomly",
"pytest-rerunfailures"
]
[tool.hatch.envs.default.scripts]
full = "pytest -n auto --reruns 5 --reruns-delay 3 -r aR --cov-report=term-missing --cov-config=pyproject.toml --cov=src/hatch_cextensions {args:tests}"
dev = "pytest -p no:randomly --no-cov {args:tests}"
[tool.hatch.envs.test.overrides]
env.HERMETIC_TESTS.type = [
{ value = "container", if = ["true"] },
"virtual",
]
env.HERMETIC_TESTS.image = { value = "python:{version}", if = ["true"] }
[[tool.hatch.envs.test.matrix]]
python = ["37", "38", "39", "310"]
[tool.hatch.envs.lint]
detached = false
extra-dependencies = [
"flake8>=5.0.0",
"flake8-bandit>=2.1.2",
"flake8-black>=0.3.0",
"flake8-bugbear>=22.7.1",
"flake8-docstrings>=1.6.0",
"flake8-isort",
"flake8-tidy-imports>=4.8.0",
"mypy>=0.971",
"pre-commit>=2.16.0",
"pre-commit-hooks>=4.1.0"
]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:src/hatch_cextensions tests}"
style = [
"flake8 {args:src/hatch_cextensions tests}"
]
fmt = [
"isort {args:src/hatch_cextensions tests}",
"black {args:.}",
"style",
]
all = [
"fmt",
"typing",
]
[tool.mypy]
strict = true
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[tool.black]
include = '\.pyi?$'
line-length = 120
target-version = ["py37"]
[tool.isort]
profile = "black"
force_single_line = true
lines_after_imports = 2
line_length = 120
skip_gitignore = false
[tool.coverage.run]
branch = true
parallel = true
omit = [
"src/hatch_cextensions/__about__.py",
]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]