!55 upgrade to 1.12.0
From: @SuperSix173 Reviewed-by: @wangbin224 Signed-off-by: @wangbin224
This commit is contained in:
commit
33377d95d2
@ -1,66 +0,0 @@
|
|||||||
From 3c89445b6439f3ce7bffc4cf11c6407c39faedc5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matus Valo <matusvalo@users.noreply.github.com>
|
|
||||||
Date: Thu, 6 Jul 2023 16:55:25 +0200
|
|
||||||
Subject: [PATCH] BLD: copy `cython_optimize.pxd` to build dir (#18810)
|
|
||||||
|
|
||||||
Closes gh-18792
|
|
||||||
|
|
||||||
[skip cirrus] [skip circle]
|
|
||||||
|
|
||||||
---------
|
|
||||||
|
|
||||||
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
|
|
||||||
---
|
|
||||||
scipy/optimize/cython_optimize.pxd | 2 +-
|
|
||||||
scipy/optimize/cython_optimize/meson.build | 1 +
|
|
||||||
scipy/optimize/meson.build | 8 +++++++-
|
|
||||||
3 files changed, 9 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/scipy/optimize/cython_optimize.pxd b/scipy/optimize/cython_optimize.pxd
|
|
||||||
index d5a0bdd75..d35f8da68 100644
|
|
||||||
--- a/scipy/optimize/cython_optimize.pxd
|
|
||||||
+++ b/scipy/optimize/cython_optimize.pxd
|
|
||||||
@@ -7,5 +7,5 @@
|
|
||||||
# support. Changing it causes an ABI forward-compatibility break
|
|
||||||
# (gh-11793), so we currently leave it as is (no further cimport
|
|
||||||
# statements should be used in this file).
|
|
||||||
-from .cython_optimize._zeros cimport (
|
|
||||||
+from scipy.optimize.cython_optimize._zeros cimport (
|
|
||||||
brentq, brenth, ridder, bisect, zeros_full_output)
|
|
||||||
diff --git a/scipy/optimize/cython_optimize/meson.build b/scipy/optimize/cython_optimize/meson.build
|
|
||||||
index 359ea8418..ee8def39b 100644
|
|
||||||
--- a/scipy/optimize/cython_optimize/meson.build
|
|
||||||
+++ b/scipy/optimize/cython_optimize/meson.build
|
|
||||||
@@ -17,6 +17,7 @@ cy_opt_gen = generator(cython,
|
|
||||||
arguments : cython_args,
|
|
||||||
output : '@BASENAME@.c',
|
|
||||||
depends : [_cython_tree,
|
|
||||||
+ cython_optimize_pxd,
|
|
||||||
_dummy_init_optimize,
|
|
||||||
_dummy_init_cyoptimize])
|
|
||||||
|
|
||||||
diff --git a/scipy/optimize/meson.build b/scipy/optimize/meson.build
|
|
||||||
index 26458b05c..4c5ab7983 100644
|
|
||||||
--- a/scipy/optimize/meson.build
|
|
||||||
+++ b/scipy/optimize/meson.build
|
|
||||||
@@ -206,10 +206,16 @@ endif
|
|
||||||
|
|
||||||
_dummy_init_optimize = fs.copyfile('__init__.py')
|
|
||||||
|
|
||||||
+# Copying this .pxd file is only needed because of a Cython bug, see
|
|
||||||
+# discussion on SciPy PR gh-18810.
|
|
||||||
+cython_optimize_pxd = [
|
|
||||||
+ fs.copyfile('cython_optimize.pxd'),
|
|
||||||
+]
|
|
||||||
+
|
|
||||||
opt_gen = generator(cython,
|
|
||||||
arguments : cython_args,
|
|
||||||
output : '@BASENAME@.c',
|
|
||||||
- depends : [_cython_tree, cython_linalg, _dummy_init_optimize])
|
|
||||||
+ depends : [_cython_tree, cython_linalg, cython_optimize_pxd, _dummy_init_optimize])
|
|
||||||
|
|
||||||
_bglu_dense_c = opt_gen.process('_bglu_dense.pyx')
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
From a181fd5b75f2e05d1b7beafbb48157feaa468941 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matus Valo <matusvalo@users.noreply.github.com>
|
|
||||||
Date: Wed, 3 May 2023 22:22:36 +0200
|
|
||||||
Subject: [PATCH] MAINT: Allow scipy to be compiled in cython3 (#18242)
|
|
||||||
|
|
||||||
- Unpin Cython and use Cython master in the pre-release CI job
|
|
||||||
- Use absolute instead of relative imports in a few places
|
|
||||||
- Use `CYTHON_EXTERN_C` for C++ code exposing a C API
|
|
||||||
|
|
||||||
[skip ci]
|
|
||||||
---
|
|
||||||
.github/workflows/linux_meson.yml | 5 ++---
|
|
||||||
scipy/linalg.pxd | 2 +-
|
|
||||||
scipy/special.pxd | 2 +-
|
|
||||||
scipy/special/meson.build | 2 +-
|
|
||||||
4 files changed, 5 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/scipy/linalg.pxd b/scipy/linalg.pxd
|
|
||||||
index 1f656b870..c7c49f9ad 100644
|
|
||||||
--- a/scipy/linalg.pxd
|
|
||||||
+++ b/scipy/linalg.pxd
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-from .linalg cimport cython_blas, cython_lapack
|
|
||||||
+from scipy.linalg cimport cython_blas, cython_lapack
|
|
||||||
diff --git a/scipy/special.pxd b/scipy/special.pxd
|
|
||||||
index 62cb82807..1daa9fb37 100644
|
|
||||||
--- a/scipy/special.pxd
|
|
||||||
+++ b/scipy/special.pxd
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-from .special cimport cython_special
|
|
||||||
+from scipy.special cimport cython_special
|
|
||||||
diff --git a/scipy/special/meson.build b/scipy/special/meson.build
|
|
||||||
index 334f87943..e7e25aa54 100644
|
|
||||||
--- a/scipy/special/meson.build
|
|
||||||
+++ b/scipy/special/meson.build
|
|
||||||
@@ -371,7 +371,7 @@ py3.extension_module('_ufuncs_cxx',
|
|
||||||
[ufuncs_cxx_sources,
|
|
||||||
uf_cython_gen_cpp.process(cython_special[2]), # _ufuncs_cxx.pyx
|
|
||||||
],
|
|
||||||
- cpp_args: cython_cpp_args,
|
|
||||||
+ cpp_args: [cython_cpp_args, '-DCYTHON_EXTERN_C=extern "C"'],
|
|
||||||
include_directories: [inc_np, '../_lib/boost', '../_lib',
|
|
||||||
'../_build_utils/src'],
|
|
||||||
link_args: version_link_args,
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,67 +0,0 @@
|
|||||||
From 50d0825256ddb76c5567e6cc8eb50e7d36908e21 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matus Valo <matusvalo@gmail.com>
|
|
||||||
Date: Mon, 17 Apr 2023 23:00:04 +0200
|
|
||||||
Subject: [PATCH] Mark function pointer ctypedefs as noexcept
|
|
||||||
|
|
||||||
---
|
|
||||||
scipy/cluster/_hierarchy_distance_update.pxi | 2 +-
|
|
||||||
scipy/optimize/cython_optimize/_zeros.pxd | 2 +-
|
|
||||||
scipy/stats/_qmc_cy.pyx | 2 +-
|
|
||||||
scipy/stats/_unuran/unuran_wrapper.pyx.templ | 2 +-
|
|
||||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/scipy/cluster/_hierarchy_distance_update.pxi b/scipy/cluster/_hierarchy_distance_update.pxi
|
|
||||||
index 17dedb305..bc57a3fa1 100644
|
|
||||||
--- a/scipy/cluster/_hierarchy_distance_update.pxi
|
|
||||||
+++ b/scipy/cluster/_hierarchy_distance_update.pxi
|
|
||||||
@@ -24,7 +24,7 @@ d_xyi : double
|
|
||||||
"""
|
|
||||||
ctypedef double (*linkage_distance_update)(double d_xi, double d_yi,
|
|
||||||
double d_xy, int size_x,
|
|
||||||
- int size_y, int size_i)
|
|
||||||
+ int size_y, int size_i) noexcept
|
|
||||||
|
|
||||||
|
|
||||||
cdef double _single(double d_xi, double d_yi, double d_xy,
|
|
||||||
diff --git a/scipy/optimize/cython_optimize/_zeros.pxd b/scipy/optimize/cython_optimize/_zeros.pxd
|
|
||||||
index c6241d022..d3c9e98f0 100644
|
|
||||||
--- a/scipy/optimize/cython_optimize/_zeros.pxd
|
|
||||||
+++ b/scipy/optimize/cython_optimize/_zeros.pxd
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# should be made to this file** --- any API additions/changes should be
|
|
||||||
# done in `cython_optimize.pxd` (see gh-11793).
|
|
||||||
|
|
||||||
-ctypedef double (*callback_type)(double, void*)
|
|
||||||
+ctypedef double (*callback_type)(double, void*) noexcept
|
|
||||||
|
|
||||||
ctypedef struct zeros_parameters:
|
|
||||||
callback_type function
|
|
||||||
diff --git a/scipy/stats/_qmc_cy.pyx b/scipy/stats/_qmc_cy.pyx
|
|
||||||
index f165cb0d1..a9e94354f 100644
|
|
||||||
--- a/scipy/stats/_qmc_cy.pyx
|
|
||||||
+++ b/scipy/stats/_qmc_cy.pyx
|
|
||||||
@@ -290,7 +290,7 @@ cdef double c_update_discrepancy(double[::1] x_new_view,
|
|
||||||
|
|
||||||
|
|
||||||
ctypedef double (*func_type)(double[:, ::1], Py_ssize_t,
|
|
||||||
- Py_ssize_t) nogil
|
|
||||||
+ Py_ssize_t) noexcept nogil
|
|
||||||
|
|
||||||
|
|
||||||
cdef double threaded_loops(func_type loop_func,
|
|
||||||
diff --git a/scipy/stats/_unuran/unuran_wrapper.pyx.templ b/scipy/stats/_unuran/unuran_wrapper.pyx.templ
|
|
||||||
index 2279dfc34..9eb63fb1c 100644
|
|
||||||
--- a/scipy/stats/_unuran/unuran_wrapper.pyx.templ
|
|
||||||
+++ b/scipy/stats/_unuran/unuran_wrapper.pyx.templ
|
|
||||||
@@ -58,7 +58,7 @@ class UNURANError(RuntimeError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
-ctypedef double (*URNG_FUNCT)(void *) nogil
|
|
||||||
+ctypedef double (*URNG_FUNCT)(void *) noexcept nogil
|
|
||||||
|
|
||||||
IF not NPY_OLD:
|
|
||||||
cdef object get_numpy_rng(object seed = None):
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
BIN
PROPACK.zip
Normal file
BIN
PROPACK.zip
Normal file
Binary file not shown.
BIN
array_api_compat.zip
Normal file
BIN
array_api_compat.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
scipy-1.12.0.tar.gz
Normal file
BIN
scipy-1.12.0.tar.gz
Normal file
Binary file not shown.
72
scipy.spec
72
scipy.spec
@ -1,21 +1,26 @@
|
|||||||
%global py_setup_args config_fc --fcompiler=gnu95 --noarch
|
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
Name: scipy
|
Name: scipy
|
||||||
Version: 1.10.1
|
Version: 1.12.0
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: A Python-based ecosystem of open-source software for mathematics, science, and engineering
|
Summary: A Python-based ecosystem of open-source software for mathematics, science, and engineering
|
||||||
License: Qhull and Apache-2.0
|
License: Qhull and Apache-2.0
|
||||||
URL: https://www.scipy.org
|
URL: https://www.scipy.org
|
||||||
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
|
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
|
||||||
|
# https://github.com/data-apis/array-api-compat/archive/affd3a56927d3d1c178023121f43c9fa624eced0.zip
|
||||||
|
Source1: array_api_compat.zip
|
||||||
|
# https://github.com/boostorg/math/archive/6bfe5818acdf86432f3e1a78ec5e1d3cdb8c6480.zip
|
||||||
|
Source2: boost_math.zip
|
||||||
|
# https://github.com/scipy/HiGHS/archive/4a122958a82e67e725d08153e099efe4dad099a2.zip
|
||||||
|
Source3: highs.zip
|
||||||
|
# https://github.com/scipy/unuran/archive/1d315c690787b14781a12e0beca6d25cc75562d6.zip
|
||||||
|
Source4: unuran.zip
|
||||||
|
# https://github.com/scipy/PROPACK/archive/96f6800451372dd003e627bbfd732937ac0c685e.zip
|
||||||
|
Source5: PROPACK.zip
|
||||||
|
|
||||||
Patch6001: 0001-MAINT-Explicitly-mark-cdef-functions-not-raising-exc.patch
|
BuildRequires: python3-devel python3-numpy-f2py
|
||||||
Patch6002: 0001-Mark-function-pointer-ctypedefs-as-noexcept.patch
|
|
||||||
Patch6003: 0001-MAINT-Allow-scipy-to-be-compiled-in-cython3-18242.patch
|
|
||||||
Patch6004: 0001-BLD-copy-cython_optimize.pxd-to-build-dir-18810.patch
|
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-numpy >= 1.8.2 python3-numpy-f2py
|
|
||||||
BuildRequires: gcc-c++ openblas-devel gcc-gfortran chrpath
|
BuildRequires: gcc-c++ openblas-devel gcc-gfortran chrpath
|
||||||
BuildRequires: pybind11-devel python3-pybind11 python3-Cython
|
BuildRequires: pybind11-devel python3-pybind11 python3-Cython
|
||||||
|
BuildRequires: python3-meson-python python3-pip
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering.
|
SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering.
|
||||||
@ -39,46 +44,48 @@ python3 package for scipy
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
cat > site.cfg << EOF
|
sed -i '/pythran/d' pyproject.toml
|
||||||
[amd]
|
|
||||||
library_dirs = %{_libdir}
|
|
||||||
include_dirs = /usr/include/suitesparse
|
|
||||||
amd_libs = amd
|
|
||||||
|
|
||||||
[umfpack]
|
cat >> pyproject.toml << EOF
|
||||||
library_dirs = %{_libdir}
|
|
||||||
include_dirs = /usr/include/suitesparse
|
|
||||||
umfpack_libs = umfpack
|
|
||||||
|
|
||||||
[openblas]
|
[tool.meson-python.args]
|
||||||
library_dirs = %{_libdir}
|
setup = ['-Duse-pythran=false']
|
||||||
openblas_libs = openblasp
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
unzip %{SOURCE1}
|
||||||
|
unzip %{SOURCE2}
|
||||||
|
unzip %{SOURCE3}
|
||||||
|
unzip %{SOURCE4}
|
||||||
|
unzip %{SOURCE5}
|
||||||
|
mv array-api-compat-affd3a56927d3d1c178023121f43c9fa624eced0/* scipy/_lib/array_api_compat/
|
||||||
|
mv math-6bfe5818acdf86432f3e1a78ec5e1d3cdb8c6480/* scipy/_lib/boost_math/
|
||||||
|
mv HiGHS-4a122958a82e67e725d08153e099efe4dad099a2/* scipy/_lib/highs/
|
||||||
|
mv unuran-1d315c690787b14781a12e0beca6d25cc75562d6/* scipy/_lib/unuran/
|
||||||
|
mv PROPACK-96f6800451372dd003e627bbfd732937ac0c685e/* scipy/sparse/linalg/_propack/PROPACK/
|
||||||
|
rm -rf array-api-compat-affd3a56927d3d1c178023121f43c9fa624eced0
|
||||||
|
rm -rf math-6bfe5818acdf86432f3e1a78ec5e1d3cdb8c6480
|
||||||
|
rm -rf HiGHS-4a122958a82e67e725d08153e099efe4dad099a2
|
||||||
|
rm -rf unuran-1d315c690787b14781a12e0beca6d25cc75562d6
|
||||||
|
rm -rf PROPACK-96f6800451372dd003e627bbfd732937ac0c685e
|
||||||
|
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export SCIPY_USE_PYTHRAN=0
|
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -lm"
|
export CFLAGS="$RPM_OPT_FLAGS -lm"
|
||||||
export LDFLAGS="$RPM_LD_FLAGS -Wall -shared"
|
export PKG_CONFIG_PATH=/use/lib64/pkgconfig
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%global _hardening_clang_cflags %{nil}
|
%global _hardening_clang_cflags %{nil}
|
||||||
env FFLAGS="$RPM_OPT_FLAGS -fPIC -w -fallow-argument-mismatch -O2"\
|
env FFLAGS="$RPM_OPT_FLAGS -fPIC -w -fallow-argument-mismatch -O2"\
|
||||||
OPENBLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
|
%pyproject_build
|
||||||
%py3_build
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export SCIPY_USE_PYTHRAN=0
|
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -lm"
|
export CFLAGS="$RPM_OPT_FLAGS -lm"
|
||||||
export LDFLAGS="$RPM_LD_FLAGS -Wall -shared"
|
|
||||||
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
env FFLAGS="$RPM_OPT_FLAGS -fPIC" \
|
env FFLAGS="$RPM_OPT_FLAGS -fPIC" \
|
||||||
OPENBLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
|
%pyproject_install scipy
|
||||||
%py3_install
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
find %{buildroot} -type f -name '*.so' -exec strip '{}' ';'
|
find %{buildroot} -type f -name '*.so' -exec strip '{}' ';'
|
||||||
@ -102,10 +109,13 @@ echo "%{_libdir}/%{name}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.c
|
|||||||
%files -n python3-scipy
|
%files -n python3-scipy
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python3_sitearch}/scipy
|
%{python3_sitearch}/scipy
|
||||||
%{python3_sitearch}/*.egg-info
|
%{python3_sitearch}/*.dist-info
|
||||||
%config(noreplace) /etc/ld.so.conf.d/*
|
%config(noreplace) /etc/ld.so.conf.d/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 22 2024 Liu Chao <liuchao173@huawei.com> - 1.12.0-1
|
||||||
|
- Upgrade to 1.12.0
|
||||||
|
|
||||||
* Thu Feb 1 2024 Liu Chao <liuchao173@huawei.com> - 1.10.1-3
|
* Thu Feb 1 2024 Liu Chao <liuchao173@huawei.com> - 1.10.1-3
|
||||||
- Fix scipy compile error in cython3
|
- Fix scipy compile error in cython3
|
||||||
|
|
||||||
|
|||||||
BIN
unuran.zip
Normal file
BIN
unuran.zip
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user