frozenlist
/
pyproject.toml
163 строки · 5.4 Кб
1[build-system]
2requires = [
3# NOTE: The following build dependencies are necessary for initial
4# NOTE: provisioning of the in-tree build backend located under
5# NOTE: `packaging/pep517_backend/`.
6"expandvars",
7"setuptools >= 47", # Minimum required for `version = attr:`
8"tomli; python_version < '3.11'",
9]
10backend-path = ["packaging"] # requires `pip >= 20` or `pep517 >= 0.6.0`
11build-backend = "pep517_backend.hooks" # wraps `setuptools.build_meta`
12
13[tool.local.cythonize]
14# This attr can contain multiple globs
15src = ["frozenlist/*.pyx"]
16
17[tool.local.cythonize.env]
18# Env vars provisioned during cythonize call
19#CFLAGS = "-DCYTHON_TRACE=1 ${CFLAGS}"
20#LDFLAGS = "${LDFLAGS}"
21
22[tool.local.cythonize.flags]
23# This section can contain the following booleans:
24# * annotate — generate annotated HTML page for source files
25# * build — build extension modules using distutils
26# * inplace — build extension modules in place using distutils (implies -b)
27# * force — force recompilation
28# * quiet — be less verbose during compilation
29# * lenient — increase Python compat by ignoring some compile time errors
30# * keep-going — compile as much as possible, ignore compilation failures
31annotate = false
32build = false
33inplace = true
34force = true
35quiet = false
36lenient = false
37keep-going = false
38
39[tool.local.cythonize.kwargs]
40# This section can contain args that have values:
41# * exclude=PATTERN exclude certain file patterns from the compilation
42# * parallel=N run builds in N parallel jobs (default: calculated per system)
43# exclude = "**.py"
44# parallel = 12
45
46[tool.local.cythonize.kwargs.directive]
47# This section can contain compiler directives. Ref:
48# https://cython.rtfd.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives
49embedsignature = "True"
50emit_code_comments = "True"
51linetrace = "True" # Implies `profile=True`
52
53[tool.local.cythonize.kwargs.compile-time-env]
54# This section can contain compile time env vars
55
56[tool.local.cythonize.kwargs.option]
57# This section can contain cythonize options
58# Ref: https://github.com/cython/cython/blob/d6e6de9/Cython/Compiler/Options.py#L694-L730
59#docstrings = "True"
60#embed_pos_in_docstring = "True"
61#warning_errors = "True"
62#error_on_unknown_names = "True"
63#error_on_uninitialized = "True"
64
65[tool.towncrier]
66package = "frozenlist"
67filename = "CHANGES.rst"
68directory = "CHANGES/"
69title_format = "{version} ({project_date})"
70template = "CHANGES/.TEMPLATE.rst"
71issue_format = ":issue:`{issue}`"
72
73# NOTE: The types are declared because:
74# NOTE: - there is no mechanism to override just the value of
75# NOTE: `tool.towncrier.type.misc.showcontent`;
76# NOTE: - and, we want to declare extra non-default types for
77# NOTE: clarity and flexibility.
78
79[[tool.towncrier.section]]
80path = ""
81
82[[tool.towncrier.type]]
83# Something we deemed an improper undesired behavior that got corrected
84# in the release to match pre-agreed expectations.
85directory = "bugfix"
86name = "Bug fixes"
87showcontent = true
88
89[[tool.towncrier.type]]
90# New behaviors, public APIs. That sort of stuff.
91directory = "feature"
92name = "Features"
93showcontent = true
94
95[[tool.towncrier.type]]
96# Declarations of future API removals and breaking changes in behavior.
97directory = "deprecation"
98name = "Deprecations (removal in next major release)"
99showcontent = true
100
101[[tool.towncrier.type]]
102# When something public gets removed in a breaking way. Could be
103# deprecated in an earlier release.
104directory = "breaking"
105name = "Removals and backward incompatible breaking changes"
106showcontent = true
107
108[[tool.towncrier.type]]
109# Notable updates to the documentation structure or build process.
110directory = "doc"
111name = "Improved documentation"
112showcontent = true
113
114[[tool.towncrier.type]]
115# Notes for downstreams about unobvious side effects and tooling. Changes
116# in the test invocation considerations and runtime assumptions.
117directory = "packaging"
118name = "Packaging updates and notes for downstreams"
119showcontent = true
120
121[[tool.towncrier.type]]
122# Stuff that affects the contributor experience. e.g. Running tests,
123# building the docs, setting up the development environment.
124directory = "contrib"
125name = "Contributor-facing changes"
126showcontent = true
127
128[[tool.towncrier.type]]
129# Changes that are hard to assign to any of the above categories.
130directory = "misc"
131name = "Miscellaneous internal changes"
132showcontent = true
133
134[tool.cibuildwheel]
135build-frontend = "build"
136before-test = [
137# NOTE: Attempt to have pip pre-compile PyYAML wheel with our build
138# NOTE: constraints unset. The hope is that pip will cache that wheel
139# NOTE: and the test env provisioning stage will pick up PyYAML from
140# NOTE: said cache rather than attempting to build it with a conflicting.
141# NOTE: Version of Cython.
142# Ref: https://github.com/pypa/cibuildwheel/issues/1666
143"PIP_CONSTRAINT= pip install PyYAML",
144]
145# test-requires = "-r requirements/ci-wheel.txt"
146# test-command = "pytest -v --no-cov {project}/tests"
147
148# don't build PyPy wheels, install from source instead
149skip = "pp*"
150
151[tool.cibuildwheel.environment]
152COLOR = "yes"
153FORCE_COLOR = "1"
154MYPY_FORCE_COLOR = "1"
155# PIP_CONSTRAINT = "requirements/cython.txt"
156PRE_COMMIT_COLOR = "always"
157PY_COLORS = "1"
158
159[tool.cibuildwheel.config-settings]
160pure-python = "false"
161
162[tool.cibuildwheel.windows]
163before-test = [] # Windows cmd has different syntax and pip chooses wheels
164