Debian Codegraph @

pyproject.toml

raw
1 [build-system]
2 requires = [
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 ]
10 backend-path = ["packaging"] # requires `pip >= 20` or `pep517 >= 0.6.0`
11 build-backend = "pep517_backend.hooks" # wraps `setuptools.build_meta`
12
13 [tool.local.cythonize]
14 # This attr can contain multiple globs
15 src = ["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
31 annotate = false
32 build = false
33 inplace = true
34 force = true
35 quiet = false
36 lenient = false
37 keep-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
49 embedsignature = "True"
50 emit_code_comments = "True"
51
52 [tool.local.cythonize.kwargs.compile-time-env]
53 # This section can contain compile time env vars
54
55 [tool.local.cythonize.kwargs.option]
56 # This section can contain cythonize options
57 # Ref: https://github.com/cython/cython/blob/d6e6de9/Cython/Compiler/Options.py#L694-L730
58 #docstrings = "True"
59 #embed_pos_in_docstring = "True"
60 #warning_errors = "True"
61 #error_on_unknown_names = "True"
62 #error_on_uninitialized = "True"
63
64 [tool.cibuildwheel]
65 enable = ["cpython-freethreading"]
66 build-frontend = "build"
67 before-test = [
68 # NOTE: Attempt to have pip pre-compile PyYAML wheel with our build
69 # NOTE: constraints unset. The hope is that pip will cache that wheel
70 # NOTE: and the test env provisioning stage will pick up PyYAML from
71 # NOTE: said cache rather than attempting to build it with a conflicting.
72 # NOTE: Version of Cython.
73 # Ref: https://github.com/pypa/cibuildwheel/issues/1666
74 "PIP_CONSTRAINT= pip install PyYAML",
75 ]
76 # test-requires = "-r requirements/ci-wheel.txt"
77 # test-command = "pytest -v --no-cov {project}/tests"
78
79 # don't build PyPy wheels, install from source instead
80 skip = "pp*"
81
82 [tool.cibuildwheel.environment]
83 COLOR = "yes"
84 FORCE_COLOR = "1"
85 MYPY_FORCE_COLOR = "1"
86 PIP_CONSTRAINT = "requirements/cython.txt"
87 PRE_COMMIT_COLOR = "always"
88 PY_COLORS = "1"
89
90 [tool.cibuildwheel.config-settings]
91 pure-python = "false"
92
93 [tool.cibuildwheel.windows]
94 before-test = [] # Windows cmd has different syntax and pip chooses wheels