From b58a67b941b2f3be6bf48245c2259e9328ca6fbc Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Wed, 3 Apr 2024 05:37:05 +0000 Subject: [PATCH] python-scipy: bump to 1.13.0 --- .../python-scipy/0001-aligned-alloc.patch | 11 ++++++ packages/python-scipy/0001-pr-19909.patch | 38 ------------------- ...2-fix-the-logging-of-f2pymod-wrapper.patch | 14 +++++++ packages/python-scipy/build.sh | 4 +- 4 files changed, 27 insertions(+), 40 deletions(-) create mode 100644 packages/python-scipy/0001-aligned-alloc.patch delete mode 100644 packages/python-scipy/0001-pr-19909.patch create mode 100644 packages/python-scipy/0002-fix-the-logging-of-f2pymod-wrapper.patch diff --git a/packages/python-scipy/0001-aligned-alloc.patch b/packages/python-scipy/0001-aligned-alloc.patch new file mode 100644 index 0000000000..c988141d02 --- /dev/null +++ b/packages/python-scipy/0001-aligned-alloc.patch @@ -0,0 +1,11 @@ +--- a/scipy/_lib/pocketfft/pocketfft_hdronly.h ++++ b/scipy/_lib/pocketfft/pocketfft_hdronly.h +@@ -156,7 +156,7 @@ + // the standard C++ library on Windows does not provide aligned_alloc() even + // though the MinGW compiler and MSVC may advertise C++17 compliance. + // aligned_alloc is only supported from MacOS 10.15. +-#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15) ++#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15) && !(defined(__ANDROID__) && __ANDROID_API__ < 26) + inline void *aligned_alloc(size_t align, size_t size) + { + // aligned_alloc() requires that the requested size is a multiple of "align" diff --git a/packages/python-scipy/0001-pr-19909.patch b/packages/python-scipy/0001-pr-19909.patch deleted file mode 100644 index 3c91aba64e..0000000000 --- a/packages/python-scipy/0001-pr-19909.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8c96a1f742335bca283aae418763aaba62c03378 Mon Sep 17 00:00:00 2001 -From: Ilhan Polat -Date: Thu, 18 Jan 2024 14:47:42 +0100 -Subject: [PATCH] MAINT:linalg:Adjust lwork/liwork changes OpenBLAS 0.3.26 - -See https://github.com/Reference-LAPACK/lapack/pull/942 ---- - scipy/linalg/flapack_sym_herm.pyf.src | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/scipy/linalg/flapack_sym_herm.pyf.src b/scipy/linalg/flapack_sym_herm.pyf.src -index f07dbaecbc72..af04e0d8d8d8 100644 ---- a/scipy/linalg/flapack_sym_herm.pyf.src -+++ b/scipy/linalg/flapack_sym_herm.pyf.src -@@ -762,8 +762,8 @@ subroutine syevr(compute_v,range,lower,n,a,lda,vl,vu,il,iu,abstol,w,z,m - optional,intent(in) :: vl=0.0 - optional,intent(in),check(vu>=vl),depend(vl) :: vu=1.0 - intent(in) :: abstol=0.0 -- integer optional,intent(in),depend(n),check(lwork>=max(1,26*n)||lwork==-1) :: lwork=max(26*n,1) -- integer optional,intent(in),depend(n),check(liwork>=max(1,10*n)||liwork==-1):: liwork= max(1,10*n) -+ integer optional,intent(in),depend(n),check(lwork>=(n <= 1 ? 1 : max(1,26*n))||lwork==-1) :: lwork=max(26*n,1) -+ integer optional,intent(in),depend(n),check(liwork>=(n <= 1 ? 1 : max(1,10*n))||liwork==-1):: liwork= max(1,10*n) - - integer intent(hide),depend(a) :: n=shape(a,0) - integer intent(hide),depend(n) :: lda=max(1,n) -@@ -832,9 +832,9 @@ subroutine heevr(compute_v,range,lower,n,a,lda,vl,vu,il,iu,abstol,w,z, - optional,intent(in) :: vl=0.0 - optional,intent(in),check(vu>vl),depend(vl) :: vu=1.0 - intent(in) :: abstol=0.0 -- integer optional,intent(in),depend(n),check(lwork>=max(2*n,1)||lwork==-1) :: lwork=max(2*n,1) -- integer optional,intent(in),depend(n),check(lrwork>=max(24*n,1)||lrwork==-1) :: lrwork=max(24*n,1) -- integer optional,intent(in),depend(n),check(liwork>=max(1,10*n)||liwork==-1):: liwork= max(1,10*n) -+ integer optional,intent(in),depend(n),check(lwork>=(n <= 1 ? 1 : max(1,2*n))||lwork==-1) :: lwork=max(2*n,1) -+ integer optional,intent(in),depend(n),check(lrwork>=(n <= 1 ? 1 : max(1,24*n))||lrwork==-1) :: lrwork=max(24*n,1) -+ integer optional,intent(in),depend(n),check(liwork>=(n <= 1 ? 1 : max(1,10*n))||liwork==-1):: liwork= max(1,10*n) - - integer intent(hide),depend(a) :: n=shape(a,0) - integer intent(hide),depend(n) :: lda=max(1,n) diff --git a/packages/python-scipy/0002-fix-the-logging-of-f2pymod-wrapper.patch b/packages/python-scipy/0002-fix-the-logging-of-f2pymod-wrapper.patch new file mode 100644 index 0000000000..4f362b8300 --- /dev/null +++ b/packages/python-scipy/0002-fix-the-logging-of-f2pymod-wrapper.patch @@ -0,0 +1,14 @@ +--- a/tools/generate_f2pymod.py ++++ b/tools/generate_f2pymod.py +@@ -290,9 +290,9 @@ + cwd=os.getcwd()) + out, err = p.communicate() + if not (p.returncode == 0): +- raise RuntimeError(f"Writing {args.outfile} with f2py failed!\n" ++ raise RuntimeError(f"Processing {fname_pyf} with f2py failed!\n" + f"{out}\n" +- r"{err}") ++ f"{err}") + + + if __name__ == "__main__": diff --git a/packages/python-scipy/build.sh b/packages/python-scipy/build.sh index 07fb375413..b3db2f1a35 100644 --- a/packages/python-scipy/build.sh +++ b/packages/python-scipy/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://scipy.org/ TERMUX_PKG_DESCRIPTION="Fundamental algorithms for scientific computing in Python" TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="1.12.0" +TERMUX_PKG_VERSION="1.13.0" TERMUX_PKG_SRCURL=git+https://github.com/scipy/scipy TERMUX_PKG_DEPENDS="libc++, libopenblas, python, python-numpy" TERMUX_PKG_BUILD_DEPENDS="python-numpy-static" @@ -58,7 +58,7 @@ termux_step_configure() { termux_step_make() { pushd $TERMUX_PKG_SRCDIR - python -m build -w -n -x --config-setting builddir=$TERMUX_PKG_BUILDDIR . + PYTHONPATH= python -m build -w -n -x --config-setting builddir=$TERMUX_PKG_BUILDDIR . popd }