Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (152 loc) · 6.18 KB
/
Copy pathpyproject.toml
File metadata and controls
174 lines (152 loc) · 6.18 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
[build-system]
requires = [
# NOTE: The following build dependencies are necessary for initial
# NOTE: provisioning of the in-tree build backend located under
# NOTE: `packaging/pep517_backend/`.
# setuptools >= 77.0 required for PEP 639 SPDX license metadata
# (it also covers the >= 67.0 floor needed for Python 3.12+ support).
"setuptools >= 77.0",
"tomli; python_version < '3.11'",
]
backend-path = ["packaging"] # requires `pip >= 20` or `pep517 >= 0.6.0`
build-backend = "pep517_backend.hooks" # wraps `setuptools.build_meta`
[project]
name = "propcache"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
description = "Accelerated property cache"
authors = [{ name = "Andrew Svetlov", email = "andrew.svetlov@gmail.com" }]
maintainers = [{ name = "aiohttp team", email = "team@aiohttp.org" }]
requires-python = ">=3.10"
keywords = [
"cython",
"cext",
"propcache",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ["version", "readme"]
[project.urls]
"Homepage" = "https://github.com/aio-libs/propcache"
"Chat: Matrix" = "https://matrix.to/#/#aio-libs:matrix.org"
"Chat: Matrix Space" = "https://matrix.to/#/#aio-libs-space:matrix.org"
"CI: GitHub Workflows" = "https://github.com/aio-libs/propcache/actions?query=branch:master"
"Code of Conduct" = "https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md"
"Coverage: codecov" = "https://codecov.io/github/aio-libs/propcache"
"Docs: Changelog" = "https://propcache.readthedocs.io/en/latest/changes/"
"Docs: RTD" = "https://propcache.readthedocs.io"
"GitHub: issues" = "https://github.com/aio-libs/propcache/issues"
"GitHub: repo" = "https://github.com/aio-libs/propcache"
[tool.setuptools.dynamic]
version = { attr = "propcache.__version__" }
readme = { file = ["README.rst", "CHANGES.rst"] }
# Ref:
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#src-layout
[tool.setuptools.packages.find]
where = ["src"]
include = ["propcache*"]
[tool.setuptools.package-data]
# Ref:
# https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data
# (see notes for the asterisk/`*` meaning)
"*" = ["*.so", "*.pyd", "*.pyx"]
[tool.setuptools.exclude-package-data]
"*" = ["*.c", "*.h"]
[tool.local.cythonize]
# This attr can contain multiple globs
src = ["src/propcache/*.pyx"]
[tool.local.cythonize.env]
# Env vars provisioned during cythonize call. Prefer CPPFLAGS over CFLAGS:
# a CFLAGS environment variable replaces the interpreter's own compiler
# flags in setuptools' distutils, while CPPFLAGS is appended to them.
#CPPFLAGS = "-DCYTHON_TRACE=1 ${CPPFLAGS}"
#LDFLAGS = "${LDFLAGS}"
[tool.local.cythonize.flags]
# This section can contain the following booleans:
# * annotate — generate annotated HTML page for source files
# * build — build extension modules using distutils
# * inplace — build extension modules in place using distutils (implies -b)
# * force — force recompilation
# * quiet — be less verbose during compilation
# * lenient — increase Python compat by ignoring some compile time errors
# * keep-going — compile as much as possible, ignore compilation failures
annotate = false
build = false
inplace = true
force = true
quiet = false
lenient = false
keep-going = false
[tool.local.cythonize.kwargs]
# This section can contain args that have values:
# * exclude=PATTERN exclude certain file patterns from the compilation
# * parallel=N run builds in N parallel jobs (default: calculated per system)
# exclude = "**.py"
# parallel = 12
[tool.local.cythonize.kwargs.directive]
# This section can contain compiler directives. Ref:
# https://cython.rtfd.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives
embedsignature = "True"
emit_code_comments = "True"
[tool.local.cythonize.kwargs.compile-time-env]
# This section can contain compile time env vars
[tool.local.cythonize.kwargs.option]
# This section can contain cythonize options
# Ref: https://github.com/cython/cython/blob/d6e6de9/Cython/Compiler/Options.py#L694-L730
#docstrings = "True"
#embed_pos_in_docstring = "True"
#warning_errors = "True"
#error_on_unknown_names = "True"
#error_on_uninitialized = "True"
[tool.cibuildwheel]
# `build[uv]` makes cibuildwheel use `uv` for every venv it provisions,
# both on the build side (passed to `python -m build` as `--installer=uv`)
# and when materializing the test environment. uv resolves and installs
# the wheel plus `requirements/test.txt` in roughly a second; the previous
# pip-based path took noticeably longer per ABI and ran once per matrix
# cell.
build-frontend = "build[uv]"
test-requires = "-r requirements/test.txt"
test-command = "pytest -v --no-cov {project}/tests"
# Free-threaded CPython under armv7l QEMU emulation crashes with SIGBUS when
# importing the C extension; the wheel runs fine on real armv7l hardware, so
# build and ship it but skip the emulated post-build test.
test-skip = "*t-musllinux_armv7l"
[tool.cibuildwheel.environment]
COLOR = "yes"
FORCE_COLOR = "1"
MYPY_FORCE_COLOR = "1"
PIP_BUILD_CONSTRAINT = "requirements/cython.txt"
PIP_CONSTRAINT = "requirements/cython.txt"
PRE_COMMIT_COLOR = "always"
PY_COLORS = "1"
UV_BUILD_CONSTRAINT = "requirements/cython.txt"
UV_CONSTRAINT = "requirements/cython.txt"
[tool.cibuildwheel.config-settings]
pure-python = "false"
[tool.codespell]
ignore-words-list = "ccompiler"
[tool.ruff.lint]
# Keep this list small and intentional; the rest of the project still
# relies on flake8 for general style. The rules below are ones we want
# to enforce repo-wide as a baseline.
select = [
# Import sorting. Replaces the dedicated isort pre-commit hook so the
# formatter (ruff format) and the import sorter (ruff check --select I)
# come from the same tool and rev.
"I",
]
[tool.ruff.lint.isort]
known-first-party = ["propcache"]