From a121544a0a5117f194e99c363e23c3d3596cc080 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 29 Mar 2023 09:11:02 +0200 Subject: Allow globally forcing C file regeneration by setting the env var CYTHON_FORCE_REGEN=1, e.g. from external build systems. (GH-5307) --- Cython/Build/Dependencies.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v1.2.1