From 7272fc88dd736d4397c41df6444f8b23f9756351 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 9 Mar 2025 11:14:34 +0000 Subject: Add explanatory comment for MS_WIN64 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 19bdcb4..1bb2f4d 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,9 @@ else: jq_extension = Extension( "jq", sources=["jq.pyx"], - define_macros=[("MS_WIN64" , 1)] if os.name == "nt" and sys.maxsize > 2**32 else None, # https://github.com/cython/cython/issues/2670 + # MS_WIN64 has to be set to successfully build when using MinGW for 64-bit + # Windows. See: https://github.com/cython/cython/issues/2670 + define_macros=[("MS_WIN64" , 1)] if os.name == "nt" and sys.maxsize > 2**32 else None, include_dirs=[os.path.join(jq_lib_dir, "src")], extra_link_args=["-lm"] + (["-Wl,-Bstatic", "-lpthread", "-lshlwapi", "-static-libgcc"] if os.name == 'nt' else []) + link_args_deps, extra_objects=extra_objects, -- cgit v1.2.3