Skip to content

Commit 64d9df3

Browse files
committed
Fix Windows SIZEOF_VOID_P and macOS llvmlite build errors
- Windows: replace -DSIZEOF_VOID_P=8 with -DMS_WIN64 to avoid conflict with pyconfig.h (MinGW doesn't define _M_X64 so pyconfig.h falls into 32-bit branch) - macOS: remove numba from pyproject.toml build-system requires (numba/llvmlite not needed at build time, was failing because no pre-built llvmlite wheel for macosx_15_0_x86_64) - Remove invalid pp* skip selector from pyproject.toml
1 parent 3d7f5e9 commit 64d9df3

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#[build-system]
2-
#requires = ["setuptools>=42", "wheel", "Cython>=0.29.21", "numpy>=1.13.3", "numba>=0.58.0"]
2+
#requires = ["setuptools>=42", "wheel", "Cython>=0.29.21", "numpy>=1.13.3"]
33
#build-backend = "setuptools.build_meta"
44
#
55
#[tool.cibuildwheel]
66
## Configuration for building wheels using cibuildwheel
7-
#skip = "pp* *-musllinux*" # Skip PyPy and musllinux builds
7+
#skip = "*-musllinux*" # Skip musllinux builds
88
#
99
## Linux build configuration
1010
#[tool.cibuildwheel.linux]
@@ -20,12 +20,12 @@
2020
#CXXFLAGS = "-O3"
2121

2222
[build-system]
23-
requires = ["setuptools>=42", "wheel", "Cython>=0.29.21", "numpy>=1.13.3", "numba>=0.58.0"]
23+
requires = ["setuptools>=42", "wheel", "Cython>=0.29.21", "numpy>=1.13.3"]
2424
build-backend = "setuptools.build_meta"
2525

2626
[tool.cibuildwheel]
2727
# Configuration for building wheels using cibuildwheel
28-
skip = "pp* *-musllinux*" # Skip PyPy and musllinux builds
28+
skip = "*-musllinux*" # Skip musllinux builds
2929

3030
# Linux build configuration
3131
[tool.cibuildwheel.linux]

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ def force_mingw():
5353
"suitesparseconfig", "openblas"
5454
]
5555
superlu_libraries = ["superlu", "openblas"]
56-
extra_compile_args = ["-O3", "-DSIZEOF_VOID_P=8"]
56+
# Use MS_WIN64 to help pyconfig.h detect 64-bit correctly with MinGW.
57+
# Don't pass -DSIZEOF_VOID_P directly — it conflicts with pyconfig.h's own definition.
58+
import struct
59+
extra_compile_args = ["-O3"]
60+
if struct.calcsize("P") == 8:
61+
extra_compile_args.append("-DMS_WIN64")
5762
extra_link_args = []
5863
elif IS_LINUX:
5964
# On Linux, we'll use system libraries if available

0 commit comments

Comments
 (0)