File: pyproject.toml

package info (click to toggle)
pybind11 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,448 kB
  • sloc: cpp: 27,239; python: 13,512; ansic: 4,244; makefile: 204; sh: 36
file content (184 lines) | stat: -rw-r--r-- 5,007 bytes parent folder | download | duplicates (2)
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
[build-system]
requires = ["scikit-build-core >=0.11.2"]
build-backend = "scikit_build_core.build"

[project]
name = "pybind11"
description = "Seamless operability between C++11 and Python"
authors = [{name = "Wenzel Jakob", email = "wenzel.jakob@epfl.ch"}]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
readme = "README.rst"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Utilities",
    "Programming Language :: C++",
    "Programming Language :: Python :: 3 :: Only",
    "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",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Programming Language :: Python :: Implementation :: PyPy",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: C++",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = [
    "C++11",
    "Python bindings",
]
dynamic = ["version", "optional-dependencies"]
requires-python = ">=3.8"

[project.urls]
Homepage = "https://github.com/pybind/pybind11"
Documentation = "https://pybind11.readthedocs.io/"
"Bug Tracker" = "https://github.com/pybind/pybind11/issues"
Discussions = "https://github.com/pybind/pybind11/discussions"
Changelog = "https://pybind11.readthedocs.io/en/latest/changelog.html"
Chat = "https://gitter.im/pybind/Lobby"

[project.scripts]
pybind11-config = "pybind11.__main__:main"

[project.entry-points."pipx.run"]
pybind11 = "pybind11.__main__:main"

[project.entry-points.pkg_config]
pybind11 = "pybind11.share.pkgconfig"


[dependency-groups]
test = [
  "pytest",
  "build",
  "tomlkit",
]
dev = [{ include-group = "test" }]


[tool.scikit-build]
minimum-version = "build-system.requires"
sdist.exclude = [
  "/docs/**",
  "/.**",
]
wheel.install-dir = "pybind11"
wheel.platlib = false

[tool.scikit-build.cmake.define]
BUILD_TESTING = false
PYBIND11_NOPYTHON = true
prefix_for_pc_file = "${pcfiledir}/../../"

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "include/pybind11/detail/common.h"
regex = '''(?sx)
\#define \s+ PYBIND11_VERSION_MAJOR \s+ (?P<major>\d+) .*?
\#define \s+ PYBIND11_VERSION_MINOR \s+ (?P<minor>\d+) .*?
\#define \s+ PYBIND11_VERSION_PATCH \s+ (?P<patch>\S+)
'''
result = "{major}.{minor}.{patch}"

[tool.scikit-build.metadata.optional-dependencies]
provider = "scikit_build_core.metadata.template"
result = { global = ["pybind11-global=={project[version]}"]}

[[tool.scikit-build.generate]]
path = "pybind11/_version.py"
template = '''
from __future__ import annotations


def _to_int(s: str) -> int | str:
    try:
        return int(s)
    except ValueError:
        return s


__version__ = "$version"
version_info = tuple(_to_int(s) for s in __version__.split("."))
'''


[tool.uv]
# Can't use tool.uv.sources with requirements.txt
index-strategy = "unsafe-best-match"
# This extra confuses uv
override-dependencies = ["pybind11-global"]


[tool.mypy]
files = ["pybind11"]
python_version = "3.8"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true

[[tool.mypy.overrides]]
module = ["ghapi.*", "tomlkit"]  # tomlkit has types, but not very helpful
ignore_missing_imports = true


[tool.pylint]
master.py-version = "3.8"
reports.output-format = "colorized"
messages_control.disable = [
  "design",
  "fixme",
  "imports",
  "line-too-long",
  "imports",
  "invalid-name",
  "protected-access",
  "missing-module-docstring",
  "unused-argument",  # covered by Ruff ARG
  "consider-using-f-string", # triggers in _version.py incorrectly
]

[tool.ruff.lint]
extend-select = [
  "B",           # flake8-bugbear
  "I",           # isort
  "N",           # pep8-naming
  "ARG",         # flake8-unused-arguments
  "C4",          # flake8-comprehensions
  "EM",          # flake8-errmsg
  "ICN",         # flake8-import-conventions
  "PGH",         # pygrep-hooks
  "PIE",         # flake8-pie
  "PL",          # pylint
  "PT",          # flake8-pytest-style
  "RET",         # flake8-return
  "RUF100",      # Ruff-specific
  "SIM",         # flake8-simplify
  "UP",          # pyupgrade
  "YTT",         # flake8-2020
]
ignore = [
  "PLR",     # Design related pylint
  "PT011",   # Too broad with raises in pytest
  "SIM118",  # iter(x) is not always the same as iter(x.keys())
  "PLC0415", # We import in functions for various reasons
]
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
isort.required-imports = ["from __future__ import annotations"]


[tool.ruff.lint.per-file-ignores]
"tests/**" = [
  "EM",
  "N",
  "E721",
]
"tests/test_call_policies.py" = ["PLC1901"]

[tool.repo-review]
ignore = ["PP"]