summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-03-09 11:14:34 +0000
committerMichael Williamson <mike@zwobble.org>2025-03-09 11:17:51 +0000
commit7272fc88dd736d4397c41df6444f8b23f9756351 (patch)
tree9260b705f89735383f26e2f91c7a936ffe6acbb8 /setup.py
parente646b6470312adf7b183a10cfdbf7095d2499421 (diff)
Add explanatory comment for MS_WIN64
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
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,