[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/`. | |
"expandvars", | |
"setuptools >= 47", # Minimum required for `version = attr:` | |
"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` | |
[tool.local.cythonize] | |
# This attr can contain multiple globs | |
src = ["frozenlist/*.pyx"] | |
[tool.local.cythonize.env] | |
# Env vars provisioned during cythonize call | |
#CFLAGS = "-DCYTHON_TRACE=1 ${CFLAGS}" | |
#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" | |
linetrace = "True" # Implies `profile=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.towncrier] | |
package = "frozenlist" | |
filename = "CHANGES.rst" | |
directory = "CHANGES/" | |
title_format = "{version} ({project_date})" | |
template = "CHANGES/.TEMPLATE.rst" | |
issue_format = ":issue:`{issue}`" | |
# NOTE: The types are declared because: | |
# NOTE: - there is no mechanism to override just the value of | |
# NOTE: `tool.towncrier.type.misc.showcontent`; | |
# NOTE: - and, we want to declare extra non-default types for | |
# NOTE: clarity and flexibility. | |
[[tool.towncrier.section]] | |
path = "" | |
[[tool.towncrier.type]] | |
# Something we deemed an improper undesired behavior that got corrected | |
# in the release to match pre-agreed expectations. | |
directory = "bugfix" | |
name = "Bug fixes" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# New behaviors, public APIs. That sort of stuff. | |
directory = "feature" | |
name = "Features" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# Declarations of future API removals and breaking changes in behavior. | |
directory = "deprecation" | |
name = "Deprecations (removal in next major release)" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# When something public gets removed in a breaking way. Could be | |
# deprecated in an earlier release. | |
directory = "breaking" | |
name = "Removals and backward incompatible breaking changes" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# Notable updates to the documentation structure or build process. | |
directory = "doc" | |
name = "Improved documentation" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# Notes for downstreams about unobvious side effects and tooling. Changes | |
# in the test invocation considerations and runtime assumptions. | |
directory = "packaging" | |
name = "Packaging updates and notes for downstreams" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# Stuff that affects the contributor experience. e.g. Running tests, | |
# building the docs, setting up the development environment. | |
directory = "contrib" | |
name = "Contributor-facing changes" | |
showcontent = true | |
[[tool.towncrier.type]] | |
# Changes that are hard to assign to any of the above categories. | |
directory = "misc" | |
name = "Miscellaneous internal changes" | |
showcontent = true | |
[tool.cibuildwheel] | |
build-frontend = "build" | |
before-test = [ | |
# NOTE: Attempt to have pip pre-compile PyYAML wheel with our build | |
# NOTE: constraints unset. The hope is that pip will cache that wheel | |
# NOTE: and the test env provisioning stage will pick up PyYAML from | |
# NOTE: said cache rather than attempting to build it with a conflicting. | |
# NOTE: Version of Cython. | |
# Ref: https://github.com/pypa/cibuildwheel/issues/1666 | |
"PIP_CONSTRAINT= pip install PyYAML", | |
] | |
# test-requires = "-r requirements/ci-wheel.txt" | |
# test-command = "pytest -v --no-cov {project}/tests" | |
# don't build PyPy wheels, install from source instead | |
skip = "pp*" | |
[tool.cibuildwheel.environment] | |
COLOR = "yes" | |
FORCE_COLOR = "1" | |
MYPY_FORCE_COLOR = "1" | |
# PIP_CONSTRAINT = "requirements/cython.txt" | |
PRE_COMMIT_COLOR = "always" | |
PY_COLORS = "1" | |
[tool.cibuildwheel.config-settings] | |
pure-python = "false" | |
[tool.cibuildwheel.windows] | |
before-test = [] # Windows cmd has different syntax and pip chooses wheels | |