Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (216 loc) · 6.13 KB
/
Copy pathpyproject.toml
File metadata and controls
242 lines (216 loc) · 6.13 KB
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
[build-system]
build-backend = "mesonpy"
requires = [
"meson-python >= 0.18.0",
"pybind11 >= 2.13.2, != 2.13.3",
]
[project]
authors = [
{name = "Ian Thomas", email = "ianthomas23@gmail.com"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"numpy >= 2.0",
]
description = "Python library for calculating contours of 2D quadrilateral grids"
dynamic = ["version"]
license = "BSD-3-Clause"
license-files= ["LICENSE"]
name = "contourpy"
readme = "README_simple.md"
requires-python = ">= 3.12"
[project.optional-dependencies]
docs = [
"myst-parser",
"sphinx",
"sphinx-book-theme",
"sphinx-copybutton",
]
bokeh = [
# Optional dependencies to support use of bokeh renderer.
# Also needs chrome/chromium and chromedriver for export to PNG/SVG/buffer.
"bokeh",
"selenium",
]
mypy = [
# Requirements to run mypy to check type annotations.
"contourpy[bokeh,docs]",
"bokeh",
"docutils-stubs",
"mypy == 2.1.0",
"types-Pillow",
]
test = [
# Standard test dependencies.
"contourpy[test-no-images]",
"matplotlib",
"pre-commit",
"Pillow",
]
test-no-images = [
# Dependencies to run tests excluding image-generating tests.
"pytest",
"pytest-cov",
"pytest-rerunfailures < 16",
"pytest-xdist",
"wurlitzer",
]
[project.urls]
Homepage = "https://github.com/contourpy/contourpy"
Changelog = "https://contourpy.readthedocs.io/en/latest/changelog.html"
Documentation = "https://contourpy.readthedocs.io"
Repository = "https://github.com/contourpy/contourpy"
[tool.meson-python.args]
compile = [
"-v",
]
dist = []
install = []
setup = [
"--vsenv", # Force use of MSVC on Windows, ignored on other platforms
]
[tool.cibuildwheel]
build = "cp{312,313,313t,314,314t,315,315t}-*"
enable = ["cpython-prerelease"]
skip = [
"*-musllinux_{ppc64le,riscv64,s390x}",
"cp315*_riscv64",
]
test-requires = "pytest"
test-command = [
'python -c "from contourpy.util import build_config; from pprint import pprint; pprint(build_config())"',
'pytest -v {project}/tests/test_minimal.py',
]
# Only test combinations for which a numpy wheel exists to avoid compiling numpy from source.
test-skip = "*_{ppc64le,s390x} cp315-pyodide_wasm32"
[tool.cibuildwheel.ios]
xbuild-tools = ["ninja"]
# numpy iOS wheels are not on PyPI yet; see https://github.com/numpy/numpy/pull/28759
# Use the BeeWare independent repository in the meantime.
environment = { PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple" }
test-sources = ["tests"]
test-command = "python -m pytest -vv tests/test_minimal.py"
[[tool.cibuildwheel.overrides]]
# See https://github.com/contourpy/contourpy/issues/424
select = "*-win_amd64"
before-all = "pwd"
config-settings.setup-args = [
"-Db_vscrt=mt",
"-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
]
[[tool.cibuildwheel.overrides]]
select = "cp315*"
inherit.environment = "append"
environment = { PIP_PRE = "1", PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/" }
[[tool.cibuildwheel.overrides]]
select = "*riscv64*"
# numpy does not provide riscv64 wheel yet. See https://github.com/numpy/numpy/issues/30216
# RISE is building and distributing popular wheels for riscv64 such as numpy
# Let's install from rise project for now: https://riseproject.gitlab.io/python/wheel_builder/packages/numpy
# Note: only manylinux wheel available (no musllinux)
before-test = "python -m pip install -v --only-binary=:all: --extra-index-url https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple numpy "
[[tool.cibuildwheel.overrides]]
# Reassert the BeeWare NumPy index for iOS. This must come after the cp315* override
# above, which would otherwise replace PIP_EXTRA_INDEX_URL with the scientific-python
# nightly index for cp315 iOS builds (NumPy iOS wheels are only on BeeWare).
select = "*-ios_*"
environment = { PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple" }
[tool.codespell]
ignore-words-list = "nd,socio-economic"
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"\\s+pass",
"raise.*Invalid FillType",
"raise.*Invalid LineType",
]
[tool.mypy]
files = ["lib/contourpy", "benchmarks", "docs", "tests"]
python_version = "3.12"
allow_redefinition = true
check_untyped_defs = true
enable_error_code = ["ignore-without-code", "truthy-bool"]
disallow_untyped_defs = true
no_implicit_optional = true
strict = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"asv.*",
"asv_runner.*",
"wurlitzer",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.test_internal"
disable_error_code = "call-arg"
[[tool.mypy.overrides]]
module = "tests.test_typecheck"
disable_error_code = ["arg-type", "list-item"]
[tool.ruff]
exclude = [
"__pycache__",
".asv",
".git",
".mypy_cache",
"build",
"dist",
]
line-length = 100
[tool.ruff.lint]
ignore = [
"B905",
"PLC0415",
"PLW2901",
]
select = [
"B",
"BLE",
"C4",
"COM",
"E",
"F",
"FA",
"FLY",
"G",
"I",
"ICN",
"INT",
"NPY",
"PERF",
"PGH",
"PIE",
"PLC",
"PLE",
"PLW",
"PYI",
"Q",
"RSE",
"RUF",
"TCH",
"TID",
"UP",
"W",
"YTT",
]
[tool.ruff.lint.isort]
known-first-party = ["contourpy"]
force-sort-within-sections = true
[tool.ruff.lint.per-file-ignores]
"docs/sphinxext/name_supports.py" = ["E402"]
"docs/sphinxext/name_supports_type.py" = ["E402"]
"docs/sphinxext/plot_directive.py" = ["B009", "B010"]
"lib/contourpy/_contourpy.pyi" = ["E501", "PLW0406"]