From a038d4c5a1e465bd5688a9596e7a596d74fca939 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 03:10:16 +0000 Subject: [PATCH 1/7] Initial plan From e3ae53b087b56574486dd8fd1ad51f9cfafe8c00 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 03:19:10 +0000 Subject: [PATCH 2/7] Add comprehensive numpy build support with Android/iOS cross-compilation Co-authored-by: Creeper19472 <38857196+Creeper19472@users.noreply.github.com> --- recipes/numpy/patches/android-support.patch | 54 +++++++++++++++++++++ recipes/numpy/recipe.yaml | 25 +++++++++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 recipes/numpy/patches/android-support.patch diff --git a/recipes/numpy/patches/android-support.patch b/recipes/numpy/patches/android-support.patch new file mode 100644 index 0000000..bc52077 --- /dev/null +++ b/recipes/numpy/patches/android-support.patch @@ -0,0 +1,54 @@ +diff -ru numpy-orig/vendored-meson/meson-python/mesonpy/__init__.py numpy/vendored-meson/meson-python/mesonpy/__init__.py +--- numpy-orig/vendored-meson/meson-python/mesonpy/__init__.py ++++ numpy/vendored-meson/meson-python/mesonpy/__init__.py +@@ -689,6 +689,50 @@ + ''') + self._meson_cross_file.write_text(cross_file_data) + self._meson_args['setup'].extend(('--cross-file', os.fspath(self._meson_cross_file))) ++ elif sysconfig_platform.startswith("android-"): ++ # Parse Android platform string: android-{api_level}-{arch} ++ parts = sysconfig_platform.split("-") ++ if len(parts) >= 3: ++ arch = parts[2] ++ # Map architecture names ++ if arch in ("aarch64", "arm64_v8a"): ++ cpu = "aarch64" ++ cpu_family = "aarch64" ++ elif arch in ("arm", "armeabi_v7a", "armv7a"): ++ cpu = "armv7" ++ cpu_family = "arm" ++ elif arch == "x86_64": ++ cpu = "x86_64" ++ cpu_family = "x86_64" ++ elif arch in ("x86", "i686"): ++ cpu = "i686" ++ cpu_family = "x86" ++ else: ++ # Fallback to using arch as-is ++ cpu = arch ++ cpu_family = arch ++ ++ cross_file_data = textwrap.dedent( ++ f""" ++ [binaries] ++ c = [{sysconfig.get_config_var("CC")!r}] ++ cpp = [{sysconfig.get_config_var("CXX")!r}] ++ ++ [host_machine] ++ system = 'android' ++ cpu = {cpu!r} ++ cpu_family = {cpu_family!r} ++ endian = 'little' ++ ++ [properties] ++ longdouble_format = 'IEEE_DOUBLE_LE' ++ """ ++ ) ++ self._meson_cross_file.write_text(cross_file_data) ++ self._meson_args["setup"].extend( ++ ("--cross-file", os.fspath(self._meson_cross_file), ++ "-Dallow-noblas=true") ++ ) + elif sysconfig_platform.startswith("ios-"): + arch = sysconfig_platform.split("-")[-2] + family = "aarch64" if arch == "arm64" else arch diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index 0a36d5e..69657d4 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -1,2 +1,25 @@ package: - name: numpy \ No newline at end of file + name: numpy + # version: "" # Optional: leave empty to use latest + +# Pip dependencies needed for building numpy +# Cython is required for building numpy's extension modules +# meson-python is the build backend (numpy uses meson build system) +pip_dependencies: + - Cython + - meson-python + +# Environment variables for the build +# PKG_CONFIG="" prevents finding host system libraries during cross-compilation +cibw_environment: + PKG_CONFIG: "" + +# CIBW config settings to pass to meson-python +# These settings are applied universally but the patches handle platform-specific cross-compilation: +# - Disable SVML (Intel's Short Vector Math Library) for portability to ARM and other non-x86 platforms +# Note: -Dallow-noblas=true is added by the patches for mobile platforms (Android/iOS) +cibw_config_settings: setup-args=-Ddisable-svml=true + +patches: + - patches/mobile-1.26.0.patch # Adds iOS/tvOS/watchOS support to meson build system + - patches/android-support.patch # Adds Android support to meson build system From 3170b8e372f547083884c400099a8c058193669d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 03:40:00 +0000 Subject: [PATCH 3/7] Remove patches and use config-only approach for numpy build Co-authored-by: Creeper19472 <38857196+Creeper19472@users.noreply.github.com> --- recipes/numpy/patches/android-support.patch | 54 ------ recipes/numpy/patches/mobile-1.26.0.patch | 181 -------------------- recipes/numpy/recipe.yaml | 20 ++- 3 files changed, 12 insertions(+), 243 deletions(-) delete mode 100644 recipes/numpy/patches/android-support.patch delete mode 100644 recipes/numpy/patches/mobile-1.26.0.patch diff --git a/recipes/numpy/patches/android-support.patch b/recipes/numpy/patches/android-support.patch deleted file mode 100644 index bc52077..0000000 --- a/recipes/numpy/patches/android-support.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -ru numpy-orig/vendored-meson/meson-python/mesonpy/__init__.py numpy/vendored-meson/meson-python/mesonpy/__init__.py ---- numpy-orig/vendored-meson/meson-python/mesonpy/__init__.py -+++ numpy/vendored-meson/meson-python/mesonpy/__init__.py -@@ -689,6 +689,50 @@ - ''') - self._meson_cross_file.write_text(cross_file_data) - self._meson_args['setup'].extend(('--cross-file', os.fspath(self._meson_cross_file))) -+ elif sysconfig_platform.startswith("android-"): -+ # Parse Android platform string: android-{api_level}-{arch} -+ parts = sysconfig_platform.split("-") -+ if len(parts) >= 3: -+ arch = parts[2] -+ # Map architecture names -+ if arch in ("aarch64", "arm64_v8a"): -+ cpu = "aarch64" -+ cpu_family = "aarch64" -+ elif arch in ("arm", "armeabi_v7a", "armv7a"): -+ cpu = "armv7" -+ cpu_family = "arm" -+ elif arch == "x86_64": -+ cpu = "x86_64" -+ cpu_family = "x86_64" -+ elif arch in ("x86", "i686"): -+ cpu = "i686" -+ cpu_family = "x86" -+ else: -+ # Fallback to using arch as-is -+ cpu = arch -+ cpu_family = arch -+ -+ cross_file_data = textwrap.dedent( -+ f""" -+ [binaries] -+ c = [{sysconfig.get_config_var("CC")!r}] -+ cpp = [{sysconfig.get_config_var("CXX")!r}] -+ -+ [host_machine] -+ system = 'android' -+ cpu = {cpu!r} -+ cpu_family = {cpu_family!r} -+ endian = 'little' -+ -+ [properties] -+ longdouble_format = 'IEEE_DOUBLE_LE' -+ """ -+ ) -+ self._meson_cross_file.write_text(cross_file_data) -+ self._meson_args["setup"].extend( -+ ("--cross-file", os.fspath(self._meson_cross_file), -+ "-Dallow-noblas=true") -+ ) - elif sysconfig_platform.startswith("ios-"): - arch = sysconfig_platform.split("-")[-2] - family = "aarch64" if arch == "arm64" else arch diff --git a/recipes/numpy/patches/mobile-1.26.0.patch b/recipes/numpy/patches/mobile-1.26.0.patch deleted file mode 100644 index 7eb0622..0000000 --- a/recipes/numpy/patches/mobile-1.26.0.patch +++ /dev/null @@ -1,181 +0,0 @@ -diff -ru numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/envconfig.py numpy-1.26.0/vendored-meson/meson/mesonbuild/envconfig.py ---- numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/envconfig.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson/mesonbuild/envconfig.py 2023-10-17 15:16:38 -@@ -317,9 +317,33 @@ - - def is_darwin(self) -> bool: - """ -- Machine is Darwin (iOS/tvOS/OS X)? -+ Machine is a Darwin kernel (iOS/tvOS/macOS)? - """ -- return self.system in {'darwin', 'ios', 'tvos'} -+ return self.system in {'darwin', 'ios', 'tvos', 'watchos'} -+ -+ def is_macOS(self) -> bool: -+ """ -+ Machine is macOS? -+ """ -+ return self.system == 'darwin' -+ -+ def is_iOS(self) -> bool: -+ """ -+ Machine is iOS? -+ """ -+ return self.system == 'ios' -+ -+ def is_tvOS(self) -> bool: -+ """ -+ Machine is tvOS? -+ """ -+ return self.system == 'tvos' -+ -+ def is_watchOS(self) -> bool: -+ """ -+ Machine is watchOS? -+ """ -+ return self.system == 'watchos' - - def is_android(self) -> bool: - """ -diff -ru numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/environment.py numpy-1.26.0/vendored-meson/meson/mesonbuild/environment.py ---- numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/environment.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson/mesonbuild/environment.py 2023-10-02 14:33:03 -@@ -290,7 +290,7 @@ - """ - if mesonlib.is_windows(): - trial = detect_windows_arch(compilers) -- elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd() or mesonlib.is_qnx() or mesonlib.is_aix(): -+ elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd() or mesonlib.is_qnx() or mesonlib.is_aix() or mesonlib.is_ios() or mesonlib.is_tvos() or mesonlib.is_watchos(): - trial = platform.processor().lower() - else: - trial = platform.machine().lower() -@@ -356,7 +356,7 @@ - def detect_cpu(compilers: CompilersDict) -> str: - if mesonlib.is_windows(): - trial = detect_windows_arch(compilers) -- elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd() or mesonlib.is_aix(): -+ elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd() or mesonlib.is_aix() or mesonlib.is_ios() or mesonlib.is_tvos() or mesonlib.is_watchos(): - trial = platform.processor().lower() - else: - trial = platform.machine().lower() -diff -ru numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/linkers/detect.py numpy-1.26.0/vendored-meson/meson/mesonbuild/linkers/detect.py ---- numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/linkers/detect.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson/mesonbuild/linkers/detect.py 2023-10-17 15:18:33 -@@ -199,7 +199,17 @@ - break - else: - __failed_to_detect_linker(compiler, check_args, o, e) -- linker = linkers.AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) -+ -+ # iOS/tvOS/watchOS have different linking needs. -+ if ( -+ env.machines[for_machine].is_iOS() -+ or env.machines[for_machine].is_tvOS() -+ or env.machines[for_machine].is_watchOS() -+ ): -+ linker = linkers.AppleMobileDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) -+ else: -+ linker = linkers.AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) -+ - elif 'GNU' in o or 'GNU' in e: - gnu_cls: T.Type[GnuDynamicLinker] - # this is always the only thing on stdout, except for swift -diff -ru numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/linkers/linkers.py numpy-1.26.0/vendored-meson/meson/mesonbuild/linkers/linkers.py ---- numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/linkers/linkers.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson/mesonbuild/linkers/linkers.py 2023-10-17 14:59:26 -@@ -829,6 +829,15 @@ - return ["-Wl,-cache_path_lto," + path] - - -+class AppleMobileDynamicLinker(AppleDynamicLinker): -+ # iOS/tvOS/watchOS need to be linked with -dynamiclib, not -bundle -+ def get_allow_undefined_args(self) -> T.List[str]: -+ return ["-framework", "Python"] -+ -+ def get_std_shared_module_args(self, options: "KeyedOptionDictType") -> T.List[str]: -+ return ["-dynamiclib", "-framework", "Python"] -+ -+ - class LLVMLD64DynamicLinker(AppleDynamicLinker): - - id = 'ld64.lld' -diff -ru numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/utils/universal.py numpy-1.26.0/vendored-meson/meson/mesonbuild/utils/universal.py ---- numpy-1.26.0-orig/vendored-meson/meson/mesonbuild/utils/universal.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson/mesonbuild/utils/universal.py 2023-10-02 13:52:21 -@@ -133,6 +133,9 @@ - 'is_netbsd', - 'is_openbsd', - 'is_osx', -+ 'is_ios', -+ 'is_tvos', -+ 'is_watchos', - 'is_qnx', - 'is_sunos', - 'is_windows', -@@ -626,6 +629,18 @@ - - def is_osx() -> bool: - return platform.system().lower() == 'darwin' -+ -+ -+def is_ios() -> bool: -+ return platform.system().lower() == 'ios' -+ -+ -+def is_tvos() -> bool: -+ return platform.system().lower() == 'tvos' -+ -+ -+def is_watchos() -> bool: -+ return platform.system().lower() == 'watchos' - - - def is_linux() -> bool: -diff -ru numpy-1.26.0-orig/vendored-meson/meson-python/mesonpy/__init__.py numpy-1.26.0/vendored-meson/meson-python/mesonpy/__init__.py ---- numpy-1.26.0-orig/vendored-meson/meson-python/mesonpy/__init__.py 1970-01-01 08:00:00 -+++ numpy-1.26.0/vendored-meson/meson-python/mesonpy/__init__.py 2023-10-03 14:33:05 -@@ -665,7 +665,8 @@ - self._install_dir.mkdir(exist_ok=True, parents=True) - - # setuptools-like ARCHFLAGS environment variable support -- if sysconfig.get_platform().startswith('macosx-'): -+ sysconfig_platform = sysconfig.get_platform() -+ if sysconfig_platform.startswith('macosx-'): - archflags = os.environ.get('ARCHFLAGS', '').strip() - if archflags: - arch, *other = filter(None, (x.strip() for x in archflags.split('-arch'))) -@@ -689,6 +690,34 @@ - ''') - self._meson_cross_file.write_text(cross_file_data) - self._meson_args['setup'].extend(('--cross-file', os.fspath(self._meson_cross_file))) -+ elif sysconfig_platform.startswith("ios-"): -+ arch = sysconfig_platform.split("-")[-2] -+ family = "aarch64" if arch == "arm64" else arch -+ cross_file_data = textwrap.dedent( -+ f""" -+ [binaries] -+ c = [{sysconfig.get_config_var("CC")!r}] -+ cpp = [{sysconfig.get_config_var("CXX")!r}] -+ -+ [host_machine] -+ system = 'ios' -+ cpu = {arch!r} -+ cpu_family = {family!r} -+ endian = 'little' -+ -+ [properties] -+ longdouble_format = 'IEEE_DOUBLE_LE' -+ """ -+ ) -+ self._meson_cross_file.write_text(cross_file_data) -+ self._meson_args["setup"].extend( -+ ( -+ # Include the Meson cross-compilation file -+ "--cross-file", os.fspath(self._meson_cross_file), -+ # Disable BLAS -+ "-Dallow-noblas=true", -+ ) -+ ) - - # load pyproject.toml - pyproject = tomllib.loads(self._source_dir.joinpath('pyproject.toml').read_text()) \ No newline at end of file diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index 69657d4..c192662 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -14,12 +14,16 @@ pip_dependencies: cibw_environment: PKG_CONFIG: "" +# Build script to set up cross-compilation +# For mobile platforms, we need to configure meson properly without patches +cibw_before_all: | + # Create a simple cross-compilation setup script + if [ "$CIBW_PLATFORM" = "android" ] || [ "$CIBW_PLATFORM" = "ios" ]; then + echo "Setting up mobile platform build for $CIBW_PLATFORM..." + fi + # CIBW config settings to pass to meson-python -# These settings are applied universally but the patches handle platform-specific cross-compilation: -# - Disable SVML (Intel's Short Vector Math Library) for portability to ARM and other non-x86 platforms -# Note: -Dallow-noblas=true is added by the patches for mobile platforms (Android/iOS) -cibw_config_settings: setup-args=-Ddisable-svml=true - -patches: - - patches/mobile-1.26.0.patch # Adds iOS/tvOS/watchOS support to meson build system - - patches/android-support.patch # Adds Android support to meson build system +# These settings configure numpy build for mobile platforms: +# - allow-noblas=true: Build without BLAS/LAPACK for simpler mobile builds +# - disable-svml=true: Disable Intel SVML for ARM portability +cibw_config_settings: setup-args=-Dallow-noblas=true setup-args=-Ddisable-svml=true From 9991bd8a8f5c9d63a47a3346ce6c0465b4cede3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 03:58:00 +0000 Subject: [PATCH 4/7] Update numpy recipe with conda-forge/void-linux best practices and disable tests Co-authored-by: Creeper19472 <38857196+Creeper19472@users.noreply.github.com> --- recipes/numpy/recipe.yaml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index c192662..083b4ba 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -3,27 +3,40 @@ package: # version: "" # Optional: leave empty to use latest # Pip dependencies needed for building numpy -# Cython is required for building numpy's extension modules -# meson-python is the build backend (numpy uses meson build system) +# Based on void-linux and conda-forge configurations: +# - Cython: Required for building numpy's extension modules +# - meson-python: Build backend (numpy uses meson build system since 1.26+) +# - build: PEP 517 build frontend (conda-forge uses python -m build) pip_dependencies: - Cython - meson-python + - build # Environment variables for the build # PKG_CONFIG="" prevents finding host system libraries during cross-compilation +# This is critical for mobile cross-compilation to avoid linking against host libs cibw_environment: PKG_CONFIG: "" # Build script to set up cross-compilation -# For mobile platforms, we need to configure meson properly without patches +# For mobile platforms, we create a builddir as conda-forge does cibw_before_all: | - # Create a simple cross-compilation setup script + # Create build directory following conda-forge pattern + mkdir -p builddir + echo "Setting up numpy build for $CIBW_PLATFORM..." + + # For mobile platforms, log the configuration if [ "$CIBW_PLATFORM" = "android" ] || [ "$CIBW_PLATFORM" = "ios" ]; then - echo "Setting up mobile platform build for $CIBW_PLATFORM..." + echo "Building for mobile platform: $CIBW_PLATFORM with architecture: $CIBW_ARCHS" + echo "Using no-BLAS mode for simplified mobile builds" fi # CIBW config settings to pass to meson-python -# These settings configure numpy build for mobile platforms: +# Based on void-linux and conda-forge build configurations: +# - builddir=builddir: Use separate build directory (conda-forge pattern) # - allow-noblas=true: Build without BLAS/LAPACK for simpler mobile builds -# - disable-svml=true: Disable Intel SVML for ARM portability -cibw_config_settings: setup-args=-Dallow-noblas=true setup-args=-Ddisable-svml=true +# - disable-svml=true: Disable Intel SVML for ARM portability (void-linux pattern) +# +# Note: Tests are skipped by default in cibuildwheel (no CIBW_TEST_COMMAND set) +# This matches the "disable sanity checks" requirement for mobile builds +cibw_config_settings: builddir=builddir setup-args=-Dallow-noblas=true setup-args=-Ddisable-svml=true From 0613c3949b72e25353596c5fc3c5bdee2d775985 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 04:03:36 +0000 Subject: [PATCH 5/7] Add meson cross file creation with skip_sanity_check for mobile builds Co-authored-by: Creeper19472 <38857196+Creeper19472@users.noreply.github.com> --- recipes/numpy/recipe.yaml | 60 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index 083b4ba..54ae439 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -19,16 +19,69 @@ cibw_environment: PKG_CONFIG: "" # Build script to set up cross-compilation -# For mobile platforms, we create a builddir as conda-forge does +# For mobile platforms, we create a builddir and meson cross file cibw_before_all: | # Create build directory following conda-forge pattern mkdir -p builddir echo "Setting up numpy build for $CIBW_PLATFORM..." - # For mobile platforms, log the configuration + # Create meson cross file for mobile platforms if [ "$CIBW_PLATFORM" = "android" ] || [ "$CIBW_PLATFORM" = "ios" ]; then echo "Building for mobile platform: $CIBW_PLATFORM with architecture: $CIBW_ARCHS" echo "Using no-BLAS mode for simplified mobile builds" + + # Determine CPU architecture for meson cross file + case "$CIBW_ARCHS" in + arm64*|aarch64) + CPU="aarch64" + CPU_FAMILY="aarch64" + ;; + x86_64) + CPU="x86_64" + CPU_FAMILY="x86_64" + ;; + armv7*|arm) + CPU="armv7" + CPU_FAMILY="arm" + ;; + x86|i686) + CPU="i686" + CPU_FAMILY="x86" + ;; + *) + CPU="$CIBW_ARCHS" + CPU_FAMILY="$CIBW_ARCHS" + ;; + esac + + # Create meson cross file with sanity checks disabled + # Using /tmp for cross-platform compatibility + CROSS_FILE="/tmp/numpy_meson_cross.txt" + cat > "$CROSS_FILE" << 'CROSSEOF' + [binaries] + c = '${CC:-cc}' + cpp = '${CXX:-c++}' + + [host_machine] + system = '$CIBW_PLATFORM' + cpu_family = '$CPU_FAMILY' + cpu = '$CPU' + endian = 'little' + + [properties] + skip_sanity_check = true + longdouble_format = 'IEEE_DOUBLE_LE' + CROSSEOF + + # Substitute variables in the cross file + sed -i "s/\${CC:-cc}/${CC:-cc}/g" "$CROSS_FILE" + sed -i "s/\${CXX:-c++}/${CXX:-c++}/g" "$CROSS_FILE" + sed -i "s/\$CIBW_PLATFORM/$CIBW_PLATFORM/g" "$CROSS_FILE" + sed -i "s/\$CPU_FAMILY/$CPU_FAMILY/g" "$CROSS_FILE" + sed -i "s/\$CPU/$CPU/g" "$CROSS_FILE" + + echo "Created meson cross file at $CROSS_FILE:" + cat "$CROSS_FILE" fi # CIBW config settings to pass to meson-python @@ -36,7 +89,8 @@ cibw_before_all: | # - builddir=builddir: Use separate build directory (conda-forge pattern) # - allow-noblas=true: Build without BLAS/LAPACK for simpler mobile builds # - disable-svml=true: Disable Intel SVML for ARM portability (void-linux pattern) +# - Cross file at /tmp/numpy_meson_cross.txt with skip_sanity_check=true for mobile builds # # Note: Tests are skipped by default in cibuildwheel (no CIBW_TEST_COMMAND set) # This matches the "disable sanity checks" requirement for mobile builds -cibw_config_settings: builddir=builddir setup-args=-Dallow-noblas=true setup-args=-Ddisable-svml=true +cibw_config_settings: builddir=builddir setup-args=--cross-file=/tmp/numpy_meson_cross.txt setup-args=-Dallow-noblas=true setup-args=-Ddisable-svml=true From b5cbab5338272052210851298f96568ddbc631ae Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Fri, 14 Nov 2025 12:50:14 +0800 Subject: [PATCH 6/7] update recipe.yaml --- recipes/numpy/recipe.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index 54ae439..e4374f0 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -12,11 +12,15 @@ pip_dependencies: - meson-python - build +host_dependencies: + - python3-dev + # Environment variables for the build # PKG_CONFIG="" prevents finding host system libraries during cross-compilation # This is critical for mobile cross-compilation to avoid linking against host libs cibw_environment: - PKG_CONFIG: "" + LDFLAGS: "-lm" +# PKG_CONFIG: "" # Build script to set up cross-compilation # For mobile platforms, we create a builddir and meson cross file From e53610dea66d44884b315eb3d2438908f8fb020b Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Fri, 12 Dec 2025 20:10:43 +0800 Subject: [PATCH 7/7] update numpy deps --- recipes/numpy/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/numpy/recipe.yaml b/recipes/numpy/recipe.yaml index e4374f0..9b9c528 100644 --- a/recipes/numpy/recipe.yaml +++ b/recipes/numpy/recipe.yaml @@ -14,6 +14,7 @@ pip_dependencies: host_dependencies: - python3-dev + - cmake # Environment variables for the build # PKG_CONFIG="" prevents finding host system libraries during cross-compilation