summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-03-29 09:11:02 +0200
committerGitHub <noreply@github.com>2023-03-29 09:11:02 +0200
commita121544a0a5117f194e99c363e23c3d3596cc080 (patch)
treebcb5db286e4e10821ec272412317057b5141b4b6
parent43ce5588fb97fba407e1af04195c01b4d710453c (diff)
downloadcython-a121544a0a5117f194e99c363e23c3d3596cc080.tar.gz
Allow globally forcing C file regeneration by setting the env var CYTHON_FORCE_REGEN=1, e.g. from external build systems. (GH-5307)
-rw-r--r--Cython/Build/Dependencies.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 1ba574d52..28c48ed8c 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -963,6 +963,9 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
pythran_options.cplus = True
pythran_options.np_pythran = True
+ if force is None:
+ force = os.environ.get("CYTHON_FORCE_REGEN") == "1" # allow global overrides for build systems
+
c_options = CompilationOptions(**options)
cpp_options = CompilationOptions(**options); cpp_options.cplus = True
ctx = c_options.create_context()