mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
numpy: update to version 2.2.1. (#11534)
Known incompatibilities on-tree were already solved, and I was able to build scipy 1.15.1 against this new version (updated scipy recipe still WIP). If anything breaks, is surely on outdated software, and we should fix that instead of keeping numpy on an older version.
This commit is contained in:
121
dev-python/numpy/numpy-2.2.1.recipe
Normal file
121
dev-python/numpy/numpy-2.2.1.recipe
Normal file
@@ -0,0 +1,121 @@
|
||||
SUMMARY="Array processing for numbers, strings, records, and objects"
|
||||
DESCRIPTION="NumPy is a general-purpose array-processing package designed to \
|
||||
efficiently manipulate large multi-dimensional arrays of arbitrary records \
|
||||
without sacrificing too much speed for small multi-dimensional arrays.
|
||||
NumPy is built on the Numeric code base and adds features introduced by \
|
||||
numarray as well as an extended C-API and the ability to create arrays of \
|
||||
arbitrary type which also makes NumPy suitable for interfacing with \
|
||||
general-purpose data-base applications."
|
||||
HOMEPAGE="https://www.numpy.org/"
|
||||
COPYRIGHT="2005-2024, NumPy Developers."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/n/numpy/numpy-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="45681fd7128c8ad1c379f0ca0776a8b0c6583d2f69889ddac01559dfe4390918"
|
||||
SOURCE_DIR="numpy-$portVersion"
|
||||
|
||||
PATCHES="numpy-2.2.1.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:liblapack$secondaryArchSuffix
|
||||
lib:libopenblas$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:liblapack$secondaryArchSuffix
|
||||
devel:libopenblas$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:f2py_$pythonVersion
|
||||
cmd:numpy_config_$pythonVersion
|
||||
\""
|
||||
|
||||
if [ $targetArchitecture = "x86_gcc2" ]; then
|
||||
eval "PROVIDES_${pythonPackage}+=\"
|
||||
numpy_$pythonPackage = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
# Provide f2py/f2py3 only for the default version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_${pythonPackage}+=\"
|
||||
cmd:f2py
|
||||
cmd:numpy_config
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
$REQUIRES
|
||||
cmd:cython$pythonVersion
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
meson_python_$pythonPackage
|
||||
wheel_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:cython$pythonVersion
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:python$pythonVersion
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
done
|
||||
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
python=python$pythonVersion
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
|
||||
# Wheel's name is in the form: "numpy-2.2.1-cp310-cp310-haiku_1_x86_64.whl"
|
||||
$python -m installer -p $prefix dist/*-cp${pythonVersion//.}-*.whl
|
||||
|
||||
# Version suffix all the scripts
|
||||
for f in $binDir/*; do
|
||||
mv $f $f-$pythonVersion
|
||||
done
|
||||
|
||||
# And provide suffix-less symlinks for the default version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
for f in $binDir/*; do
|
||||
ln -sr $f ${f%-$pythonVersion}
|
||||
done
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$prefix/bin
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user