@@ -15,6 +15,60 @@ requires = [
1515backend-path = [" packaging" ] # requires 'Pip>=20' or 'pep517>=0.6.0'
1616build-backend = " pep517_backend.hooks"
1717
18+ [tool .local .cython ]
19+ # This attr can contain multiple globs
20+ src = [" src/**/*.pyx" ]
21+
22+ [tool .local .cython .env ]
23+ # Env vars provisioned during cythonize call
24+ # ANSIBLE_PYLIBSSH_CYTHON_TRACING = "1"
25+ # CFLAGS = "-DCYTHON_TRACE=1 ${CFLAGS}"
26+ LDFLAGS = " -lssh ${LDFLAGS}"
27+
28+ [tool .local .cython .flags ]
29+ # This section can contain the following booleans:
30+ # * annotate — generate annotated HTML page for source files
31+ # * build — build extension modules using distutils
32+ # * inplace — build extension modules in place using distutils (implies -b)
33+ # * force — force recompilation
34+ # * quiet — be less verbose during compilation
35+ # * lenient — increase Python compat by ignoring some compile time errors
36+ # * keep-going — compile as much as possible, ignore compilation failures
37+ annotate = false
38+ build = false
39+ inplace = true
40+ force = true
41+ quiet = false
42+ lenient = false
43+ keep-going = false
44+
45+ [tool .local .cython .kwargs ]
46+ # This section can contain args tha have values:
47+ # * exclude=PATTERN exclude certain file patterns from the compilation
48+ # * parallel=N run builds in N parallel jobs (default: calculated per system)
49+ # exclude = "**.py"
50+ # parallel = 12
51+
52+ [tool .local .cython .kwargs .directive ]
53+ # This section can contain compiler directives
54+ # Ref: https://github.com/cython/cython/blob/d6e6de9/Cython/Compiler/Options.py#L170-L242
55+ embedsignature = " True"
56+ emit_code_comments = " True"
57+ linetrace = " True"
58+ profile = " True"
59+
60+ [tool .local .cython .kwargs .compile-time-env ]
61+ # This section can contain compile time env vars
62+
63+ [tool .local .cython .kwargs .option ]
64+ # This section can contain cythonize options
65+ # Ref: https://github.com/cython/cython/blob/d6e6de9/Cython/Compiler/Options.py#L694-L730
66+ # docstrings = "True"
67+ # embed_pos_in_docstring = "True"
68+ # warning_errors = "True"
69+ # error_on_unknown_names = "True"
70+ # error_on_uninitialized = "True"
71+
1872[tool .local .cythonize ]
1973# This attr can contain multiple globs
2074src = [" src/**/*.pyx" ]
@@ -47,7 +101,13 @@ keep-going = false
47101# * exclude=PATTERN exclude certain file patterns from the compilation
48102# * parallel=N run builds in N parallel jobs (default: calculated per system)
49103# exclude = "**.py"
50- # parallel = 12
104+ #
105+ # NOTE: Setting parallelism to 1 works around a bug in the ``cythonize``
106+ # NOTE: script that hangs on macOS under Python 3.8+ due to the use of
107+ # NOTE: the ``spawn`` method in ``multiprocessing``. This patch can be
108+ # NOTE: reverted once the fix PR is usable upstream.
109+ # Ref: https://github.com/cython/cython/pull/7183
110+ parallel = 1
51111
52112[tool .local .cythonize .kwargs .directive ]
53113# This section can contain compiler directives
0 commit comments