-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
154 lines (124 loc) · 3.82 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
[build-system]
requires = ["scikit-build-core >=0.10", "nanobind >=1.3.2"]
build-backend = "scikit_build_core.build"
[project]
name = "compas_cgal"
description = "CGAL wrapper for COMPAS."
readme = "README.md"
requires-python = ">=3.9"
authors = [
{ name = "tom van mele", email = "tom.v.mele@gmail.com" },
{ name = "Petras Vestartas", email = "petrasvestartas@gmail.com" },
]
classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/compas-dev/compas_cgal"
# ============================================================================
# replace pytest.ini
# ============================================================================
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py", "test.py"]
norecursedirs = [
"external/*",
"build/*",
"dist/*",
"*.egg-info",
".git",
".tox",
".env",
".pytest_cache",
".ruff_cache",
]
addopts = [
"-ra",
"--strict-markers",
"--doctest-glob=*.rst",
"--tb=short",
"--import-mode=importlib",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE",
"ALLOW_BYTES",
"NUMBER",
]
# ============================================================================
# scikit-build
# ============================================================================
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "build-system.requires"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}"
# Build stable ABI wheels for CPython 3.12+
wheel.py-api = "cp312"
# Configure CMake
cmake.version = ">=3.15"
cmake.build-type = "Release"
# Set CMake args for verbose output
cmake.args = ["-DCMAKE_VERBOSE_MAKEFILE=ON"]
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "src/compas_cgal/__init__.py"
[tool.scikit-build.cmake.define]
CMAKE_POLICY_DEFAULT_CMP0135 = "NEW"
# ============================================================================
# cibuildwheel
# ============================================================================
[tool.cibuildwheel]
# Necessary to see build output from the actual compilation
build-verbosity = 1
# Run pytest to ensure that the package was correctly built
test-command = "pytest {project}/tests"
test-requires = "pytest"
# Don't test Python 3.8 wheels on macOS/arm64
test-skip = "cp38-macosx_*:arm64"
# Needed for full C++17 support
[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.14"
# ============================================================================
# replace bumpversion.cfg
# ============================================================================
[tool.bumpversion]
current_version = "0.7.7"
message = "Bump version to {new_version}"
commit = true
tag = true
[[tool.bumpversion.files]]
filename = "src/compas_cgal/__init__.py"
search = "{current_version}"
replace = "{new_version}"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "Unreleased"
replace = "[{new_version}] {now:%Y-%m-%d}"
# ============================================================================
# replace setup.cfg
# ============================================================================
[tool.black]
line-length = 179
[tool.ruff]
line-length = 179
indent-width = 4
target-version = "py39"
[tool.ruff.lint]
select = ["E", "F", "I"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["I001"]
"tests/*" = ["I001"]
"tasks.py" = ["I001"]
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-doc-length = 179
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"