Skip to content

Commit

Permalink
Update numpy to 2.1.2
Browse files Browse the repository at this point in the history
virtuald committed Oct 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 11740ff commit 3aff770
Showing 4 changed files with 39 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -37,6 +37,12 @@ jobs:
# temporary fix
- run: /build/venv/bin/cross-python -m pip config set global.extra-index-url https://wpilib.jfrog.io/artifactory/api/pypi/wpilib-python-release-2025/simple

- shell: bash
name: install meson cross-file
run: |
mkdir -p ~/.local/share/meson/cross
cp meson-cross-roborio.txt ~/.local/share/meson/cross
- shell: bash
name: Install script requirements
run: |
20 changes: 20 additions & 0 deletions meson-cross-roborio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# TODO: probably should just ship this in the cross-compilation docker container?

[binaries]
c = 'arm-frc2024-linux-gnueabi-gcc'
cpp = 'arm-frc2024-linux-gnueabi-g++'
ar = 'arm-frc2024-linux-gnueabi-ar'
strip = 'arm-frc2024-linux-gnueabi-strip'
gfortran = 'arm-frc2024-linux-gnueabi-gfortran'

# requires pkgconf to be installed in build-pip
pkg-config = '/build/venv/build/bin/pkgconf'

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7l'
endian = 'little'

[properties]
longdouble_format = 'IEEE_DOUBLE_LE'
3 changes: 3 additions & 0 deletions numpy-files/_distributor_init_local.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ctypes

lib = ctypes.CDLL("/usr/local/lib/libopenblas.so.0", ctypes.RTLD_GLOBAL)
25 changes: 10 additions & 15 deletions packages.toml
Original file line number Diff line number Diff line change
@@ -33,23 +33,18 @@ version = "1.8.7"
# NPY_DISABLE_SVML = "1"

[packages.numpy]
version = "1.25.2"
mod_version = "1.25.2+r2"
build_pip_requirements = ["Cython==0.29.34,<3.0", "setuptools==68.2.2", "wheel==0.41.2"]
version = "2.1.2"
#mod_version = "1.25.2+r2"
build_pip_requirements = ["Cython>=3.0.6", "meson-python>=0.15.0", "ninja", "pkgconf"]
cross_pip_requirements = ["robotpy-openblas-dev"]
install_requirements = ["robotpy-openblas"]

[packages.numpy.environment]
F77 = "arm-frc2024-linux-gnueabi-gfortran"
F90 = "arm-frc2024-linux-gnueabi-gfortran"
# As of NumPy 1.22.0, a vendored copy of SVML will be built on x86_64 Linux
# hosts to provide AVX-512 acceleration of floating-point operations. When
# using an x86_64 Linux build system to cross compile NumPy for hosts other
# than x86_64 Linux, set the environment variable NPY_DISABLE_SVML to prevent
# the NumPy build script from incorrectly attempting to cross-compile this
# platform-specific library:
NPY_DISABLE_SVML = "1"

pip_args = [
"--config-settings=setup-args=-Dblas=openblas",
"--config-settings=setup-args=-Dallow-noblas=false",
"--config-settings=setup-args=--cross-file=meson-cross-roborio.txt",
]
[packages.numpy.add-files]
"numpy/_distributor_init_local.py" = "numpy-files/_distributor_init_local.py"

[packages.pydevd]
version = "3.1.0"

0 comments on commit 3aff770

Please sign in to comment.