From cdbb1185c43f181de0b91855445a81655a6b5fb2 Mon Sep 17 00:00:00 2001 From: Filip Jankovic <161825881+fjankovi@users.noreply.github.com> Date: Thu, 3 Sep 2026 11:45:57 -0400 Subject: [PATCH] BLD: define _USE_MATH_DEFINES in c_args Python.h includes before cwt.template.c gets a chance to define _USE_MATH_DEFINES, so the define never takes effect and M_PI is left undeclared wherever math.h gates it on that macro. Co-Authored-By: Claude Opus 5 --- pywt/_extensions/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywt/_extensions/meson.build b/pywt/_extensions/meson.build index 8f9808e6..82978ddd 100644 --- a/pywt/_extensions/meson.build +++ b/pywt/_extensions/meson.build @@ -67,7 +67,7 @@ _cython_tree = [ fs.copyfile('wavelets_list.pxi'), ] -c_args = ['-DPY_EXTENSION'] +c_args = ['-DPY_EXTENSION', '-D_USE_MATH_DEFINES'] libc_wt = static_library('c_wt', sources,