diff options
| author | lando <du33169@qq.com> | 2024-05-20 21:21:11 +0800 |
|---|---|---|
| committer | lando <du33169@qq.com> | 2024-05-23 17:41:21 +0800 |
| commit | 09ceb1d0543325181fd8beced65844216f7105b7 (patch) | |
| tree | 254258359a244f5ae6a4ad88dda93e1496893dc7 /setup.py | |
| parent | 96fc74f60ef9c55dc46f55c4d96250db1d939af4 (diff) | |
Fixed build failure on win32 & removed failed windows cibw-only
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys import subprocess import tarfile import shutil @@ -67,6 +68,8 @@ class jq_with_deps_build_ext(build_ext): use_system_libs = bool(os.environ.get("JQPY_USE_SYSTEM_LIBS")) use_prebuilt_libs = bool(os.environ.get("JQPY_USE_PREBUILT_LIBS")) +print(f"use_system_libs={use_system_libs}") +print(f"use_prebuilt_libs={use_prebuilt_libs}") if use_system_libs: jq_build_ext = build_ext @@ -80,11 +83,10 @@ else: os.path.join(jq_lib_dir, "modules/oniguruma/src/.libs/libonig.a"), ] - jq_extension = Extension( "jq", sources=["jq.c"], - define_macros=[("MS_WIN64", 1)] if os.name == 'nt' else [], + define_macros=[("MS_WIN64" , 1)] if os.name == 'nt' and sys.maxsize > 2**32 else None, # https://github.com/cython/cython/issues/2670 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, |
