python3-numpy: new dependency: meson-python; fixes problems with dependent ports

This commit is contained in:
Tim Biermann 2023-10-06 18:44:58 +02:00
parent b389ce46d1
commit ba09547699
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 561 additions and 54 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF34HPDWLwdeIgkhZwbSFV4aG5iCy4Pi0201lS4W6TD+o0jrGSIDijq1V2lTn4TCiGmpiPFhFHIw/Vi8sFtGW6mw4=
SHA256 (Pkgfile) = 45e689161369b1a4840b0b4f231bc3b0403473d39322805eb5c04bed2b311bb5
SHA256 (.footprint) = 2b3fe2611024fdbf3a644b1487904f2929ab343e54f55b62f1cef292f53edcfa
RWSagIOpLGJF3+wbRkQY+sRjPBCOx6P/aLqsfYi5bkHP7gW7qRWhy7p7ru2xqeDGMEIN0VYDOkXoBjnLkru3g16Dx9EiKb1qEAk=
SHA256 (Pkgfile) = 2db7d02d1564809652a188cd5cf156a0e252de139f91349e826a8d6813444aa3
SHA256 (.footprint) = a6d6307411f1997376788edb410d2eed320b23c3bfe0ce6a64324164583471a9
SHA256 (numpy-1.26.0.tar.gz) = f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf

View File

@ -1,29 +1,23 @@
# Description: Array processing for numbers, strings, records, and objects with Python
# URL: https://numpy.org/
# URL: https://numpy.org
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: lapack python3-cython
#python3-pyproject-metadata
# Depends on: lapack python3-cython python3-build python3-wheel python3-installer meson-python
name=python3-numpy
version=1.26.0
release=1
source=(https://github.com/${name#*-}/${name#*-}/releases/download/v$version/${name#*-}-$version.tar.gz)
release=2
source=(https://github.com/numpy/numpy/releases/download/v$version/numpy-$version.tar.gz)
build() {
export CFLAGS+=' -fno-strict-aliasing'
export ATLAS=None
export LDFLAGS="$LDFLAGS -shared"
cd numpy-$version
## broken port, this requires an older setuptools
cd ${name#*-}-$version
CFLAGS+=" -ffat-lto-objects" \
CXXFLAGS+=" -ffat-lto-objects" \
/usr/bin/python3 -m build --wheel --no-isolation \
-Csetup-args="-Dblas=blas" \
-Csetup-args="-Dlapack=lapack"
/usr/bin/python3 setup.py build
/usr/bin/python3 setup.py install --prefix=/usr \
--root=$PKG \
--skip-build
local pyv="$(python3 -c "import sys; print (sys.version_info[0], sys.version_info[1])" | sed -e 's/\ /./g')"
rm $PKG/usr/lib/python$pyv/site-packages/numpy/LICENSE.txt
/usr/bin/python3 -m installer --destdir=$PKG dist/*.whl
find $PKG \( \
-iname "LICENSE.txt" -o \
-iname "*README*" \