forked from scikit-build/scikit-build-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
250 lines (224 loc) · 8.39 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "scikit_build_core"
authors = [
{ name = "Henry Schreiner", email = "[email protected]" },
]
description = "Build backend for CMake based projects"
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Build Tools",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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 :: 3.12",
"Development Status :: 4 - Beta",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"exceptiongroup; python_version<'3.11'",
"importlib_resources >=1.3; python_version<'3.9'",
"importlib_metadata; python_version<'3.8'",
"packaging >=20.9",
"tomli >=1.1; python_version<'3.11'",
"typing_extensions >=3.10.0; python_version<'3.8'",
]
# Note: for building wheels and sdists, there are also additional dependencies
# in the pyproject extra. And cmake and possibly ninja if those are not already
# present (user controllable)
[project.optional-dependencies]
pyproject = [
"pyproject-metadata >=0.5",
"pathspec >=0.10.1",
]
test = [
"build[virtualenv]",
"cattrs >=22.2.0",
"importlib_metadata; python_version<'3.8'",
"pathspec >=0.10.1",
"pybind11",
"pyproject-metadata >=0.5",
"pytest >=7.0", # 7.2+ recommended for better tracebacks with ExceptionGroup
"pytest-subprocess >=1.5",
"setuptools",
"wheel",
]
cov = [
"pytest-cov[toml]",
]
dev = [
"build",
"cattrs >=22.2.0",
"pytest >=7.0",
"pytest-subprocess",
"rich",
]
docs = [
"furo",
"myst_parser >=0.13",
"sphinx >=4.0",
"sphinx_copybutton",
"sphinx_inline_tabs",
]
[project.urls]
Homepage = "https://github.com/scikit-build/scikit-build-core"
Documentation = "https://scikit-build-core.readthedocs.io"
Discussions = "https://github.com/orgs/scikit-build/discussions"
Issues = "https://github.com/scikit-build/scikit-build-core/issues"
Changelog = "https://scikit-build-core.readthedocs.io/en/latest/changelog.html"
[project.entry-points]
"distutils.commands".build_cmake = "scikit_build_core.setuptools.build_cmake:BuildCMake"
"distutils.setup_keywords".cmake_source_dir = "scikit_build_core.setuptools.build_cmake:cmake_source_dir"
"distutils.setup_keywords".cmake_args = "scikit_build_core.setuptools.build_cmake:cmake_args"
"setuptools.finalize_distribution_options".scikit_build_entry = "scikit_build_core.setuptools.build_cmake:finalize_distribution_options"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/scikit_build_core/_version.py"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = [
"error",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning", # Caused by wheel in tests
"ignore:Config variable '.*' is unset, Python ABI tag may be incorrect:RuntimeWarning",
"ignore:onerror argument is deprecated, use onexc instead:DeprecationWarning", # Caused by wheel and Python 3.12
"ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest", # Python 3.12
]
log_cli_level = "info"
testpaths = ["tests"]
markers = [
"broken_on_urct: Broken for now due to lib not found",
"compile: Compiles code",
"configure: Configures CMake code",
"fortran: Fortran code",
"integration: Full package build",
"isolated: Needs an isolated virtualenv",
"setuptools: Tests setuptools integration",
"virtualenv: Needs a virtualenv",
]
[tool.mypy]
files = ["src", "tests"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
python_version = "3.7"
warn_unused_configs = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["scikit_build_core.*"]
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = ["numpy", "pathspec", "setuptools_scm", "hatch_fancy_pypi_readme"]
ignore_missing_imports = true
[tool.pylint]
py-version = "3.7"
jobs = "0"
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
good-names = ["f"]
messages_control.disable = [
"design",
"fixme",
"import-outside-toplevel",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-function-docstring",
"missing-module-docstring",
"wrong-import-position",
"unnecessary-ellipsis", # Conflicts with Protocols
"broad-except",
"unused-argument", # Handled by Ruff
"redefined-builtin", # ExceptionGroup is a builtin
]
[tool.coverage]
run.source = ["scikit_build_core"]
report.exclude_lines = [
'pragma: no cover',
'\.\.\.',
'if typing.TYPE_CHECKING:',
]
[tool.check-wheel-contents]
ignore = ["W002"] # Triggers on __init__.py's
[tool.ruff]
select = [
"E", "F", "W", # flake8
"B", "B904", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"TID251", # flake8-tidy-imports.banned-api
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
]
extend-ignore = [
"PLR", # Design rules for pylint
"PLE1205", # Format check doesn't work with our custom logger
"E501", # Line too long
"PT004", # Incorrect, just usefixtures instead.
"RUF009", # Too easy to get a false positive
]
target-version = "py37"
typing-modules = ["scikit_build_core._compat.typing"]
src = ["src"]
unfixable = ["T20", "F841"]
exclude = []
[tool.ruff.flake8-tidy-imports.banned-api]
"typing.Callable".msg = "Use collections.abc.Callable instead."
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Mapping".msg = "Use collections.abc.Mapping instead."
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
"typing.Set".msg = "Use collections.abc.Set instead."
"typing.Literal".msg = "Use scikit_build_core._compat.typing.Literal instead."
"typing.Protocol".msg = "Use scikit_build_core._compat.typing.Protocol instead."
"typing.Self".msg = "Use scikit_build_core._compat.typing.Self instead."
"typing_extensions.Self".msg = "Use scikit_build_core._compat.typing.Self instead."
"typing.runtime_checkable".msg = "Use scikit_build_core._compat.typing.runtime_checkable instead."
"typing.Final".msg = "Add scikit_build_core._compat.typing.Final instead."
"typing.NotRequired".msg = "Add scikit_build_core._compat.typing.NotRequired instead."
"typing.OrderedDict".msg = "Add scikit_build_core._compat.typing.OrderedDict instead."
"typing.TypedDict".msg = "Add scikit_build_core._compat.typing.TypedDict instead."
"typing.assert_never".msg = "Add scikit_build_core._compat.typing.assert_never instead."
"tomli".msg = "Use scikit_build_core._compat.tomllib instead."
"tomllib".msg = "Use scikit_build_core._compat.tomllib instead."
"importlib.metadata".msg = "Use scikit_build_core._compat.importlib.metadata instead."
"importlib_metadata".msg = "Use scikit_build_core._compat.importlib.metadata instead."
"importlib.resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
"importlib_resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
[tool.ruff.per-file-ignores]
"tests/**" = ["T20"]
"noxfile.py" = ["T20", "TID251"]
"src/scikit_build_core/resources/*.py" = ["PTH", "ARG002"]
"src/scikit_build_core/_compat/**.py" = ["TID251"]
"tests/conftest.py" = ["TID251"]
[tool.check-sdist]
sdist-only = ["src/scikit_build_core/_version.py"]