-
Notifications
You must be signed in to change notification settings - Fork 34
/
pyproject.toml
173 lines (151 loc) · 5.53 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
[build-system]
requires = ["scikit-build-core>=0.10"]
build-backend = "backend"
backend-path = ["_build_backend"]
[project]
name = "cmake"
version = "3.31.2"
description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software"
keywords = ["CMake", "build", "c++", "fortran", "cross-platform", "cross-compilation"]
readme = "README.rst"
license = {text = "Apache 2.0"}
authors = [
{name = "Jean-Christophe Fillion-Robin", email = "jchris.fillionr@kitware.com"},
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: BSD License",
"Programming Language :: C",
"Programming Language :: C++",
"Programming Language :: Fortran",
"Programming Language :: Python",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Typing :: Typed"
]
dependencies = [
"importlib_metadata>=1.4; python_version<'3.8'",
]
requires-python = ">=3.7"
[project.urls]
Homepage = "https://cmake.org"
Documentation = "https://cmake-python-distributions.readthedocs.io"
Source = "https://github.com/scikit-build/cmake-python-distributions"
"Mailing list" = "https://groups.google.com/forum/#!forum/scikit-build"
"Bug Tracker" = "https://github.com/scikit-build/cmake-python-distributions/issues"
[project.optional-dependencies]
test = [
"coverage>=4.2",
"pytest>=3.0.3",
"pytest-cov>=2.4.0",
]
[project.scripts]
ccmake = "cmake:ccmake"
cmake = "cmake:cmake"
cpack = "cmake:cpack"
ctest = "cmake:ctest"
[tool.scikit-build]
minimum-version = "build-system.requires"
build-dir = "build/{wheel_tag}"
cmake.version = "CMakeLists.txt"
ninja.make-fallback = true
wheel.py-api = "py3"
wheel.expand-macos-universal-tags = true
wheel.install-dir = "cmake/data"
[[tool.scikit-build.generate]]
path = "cmake/_version.py"
template = '''
version = "${version}"
'''
[[tool.scikit-build.overrides]]
if.env.CMAKE_PYTHON_DIST_FORCE_NINJA_DEP = true
ninja.make-fallback = false
[[tool.scikit-build.overrides]]
if.state = "metadata_wheel"
wheel.cmake = false
wheel.platlib = true
[tool.cibuildwheel]
build = "cp39-*"
test-extras = "test"
test-command = "pytest {project}/tests"
build-verbosity = 1
build-frontend = "build[uv]"
environment = { CMAKE_PYTHON_DIST_FORCE_NINJA_DEP = "1" }
musllinux-x86_64-image = "musllinux_1_1"
musllinux-i686-image = "musllinux_1_1"
musllinux-aarch64-image = "musllinux_1_1"
musllinux-ppc64le-image = "musllinux_1_1"
musllinux-s390x-image = "musllinux_1_1"
musllinux-armv7l-image = "musllinux_1_2"
[[tool.cibuildwheel.overrides]]
select = "*-macos*"
inherit.environment = "append"
environment = { MACOSX_DEPLOYMENT_TARGET = "10.10" }
[tool.cibuildwheel.linux]
before-all = "./scripts/manylinux-build-and-install-openssl.sh"
[tool.cibuildwheel.config-settings]
"cmake.define.RUN_CMAKE_TEST" = "ON"
[tool.cibuildwheel.linux.config-settings]
"cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
"cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
"cmake.define.CMAKE_JOB_POOL_LINK" = "link"
"cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
"cmake.define.RUN_CMAKE_TEST" = "ON"
[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_*",]
config-settings."cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
config-settings."cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
config-settings."cmake.define.CMAKE_JOB_POOL_LINK" = "link"
config-settings."cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
config-settings."cmake.define.RUN_CMAKE_TEST" = "ON"
# disable some tests
# - BootstrapTest fails with custom OpenSSL and probably does not make much sense for this project
# - ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES: c.f. https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064
config-settings."cmake.define.RUN_CMAKE_TEST_EXCLUDE" = "BootstrapTest|ExportImport|RunCMake.install|RunCMake.RuntimePath|RunCMake.file-GET_RUNTIME_DEPENDENCIES"
[[tool.cibuildwheel.overrides]]
select = ["*linux_aarch64", "*linux_armv7l", "*linux_ppc64le", "*linux_s390x"]
config-settings."cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
config-settings."cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
config-settings."cmake.define.CMAKE_JOB_POOL_LINK" = "link"
config-settings."cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
# disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA
config-settings."cmake.define.RUN_CMAKE_TEST" = "OFF"
[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_s390x"]
build-frontend = "pip"
[tool.mypy]
files = ["src", "scripts"]
python_version = "3.8"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
[tool.ruff.lint]
extend-select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"EXE", # flake8-executable
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
]
ignore = [
"PLR09", # Too many X
]
exclude = ["src/cmake/_version.py"]
flake8-unused-arguments.ignore-variadic-names = true
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["E402"]
"*.pyi" = ["ARG001"]
"noxfile.py" = ["PLW0603"]