scipy/scipy.spec

154 lines
5.2 KiB
RPMSpec
Raw Permalink Normal View History

%global debug_package %{nil}
2019-11-19 11:56:51 +08:00
Name: scipy
Version: 1.12.0
Release: 1
2019-11-19 11:56:51 +08:00
Summary: A Python-based ecosystem of open-source software for mathematics, science, and engineering
2021-08-01 12:30:29 +08:00
License: Qhull and Apache-2.0
2019-11-19 11:56:51 +08:00
URL: https://www.scipy.org
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
BuildRequires: python3-devel python3-numpy-f2py
2021-09-16 03:26:43 +00:00
BuildRequires: gcc-c++ openblas-devel gcc-gfortran chrpath
BuildRequires: pybind11-devel python3-pybind11 python3-Cython
BuildRequires: python3-meson-python python3-pip
2019-11-19 11:56:51 +08:00
%description
SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering.
It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms,
2019-11-19 11:56:51 +08:00
signal and image processing, ODE solvers, and more.
SciPy depends on NumPy, which provides convenient and fast N-dimensional array manipulation.
SciPy is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines
such as routines for numerical integration and optimization.
Together, they run on all popular operating systems, are quick to install, and are free of charge.
NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers.
2019-11-19 11:56:51 +08:00
If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!
%package -n python3-scipy
Summary: python3 package for scipy
Requires: python3 python3-numpy
%description -n python3-scipy
python3 package for scipy
%prep
%autosetup -n %{name}-%{version} -p1
2019-11-19 11:56:51 +08:00
sed -i '/pythran/d' pyproject.toml
cat >> pyproject.toml << EOF
[tool.meson-python.args]
setup = ['-Duse-pythran=false']
2019-11-19 11:56:51 +08:00
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
2019-11-19 11:56:51 +08:00
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
export CFLAGS="$RPM_OPT_FLAGS -lm"
export PKG_CONFIG_PATH=/use/lib64/pkgconfig
2019-11-19 11:56:51 +08:00
pushd %{py3dir}
2023-09-25 11:11:24 +08:00
%global _hardening_clang_cflags %{nil}
2021-08-01 12:30:29 +08:00
env FFLAGS="$RPM_OPT_FLAGS -fPIC -w -fallow-argument-mismatch -O2"\
%pyproject_build
2019-11-19 11:56:51 +08:00
popd
%install
export CFLAGS="$RPM_OPT_FLAGS -lm"
pushd %{py3dir}
env FFLAGS="$RPM_OPT_FLAGS -fPIC" \
%pyproject_install scipy
2019-11-19 11:56:51 +08:00
popd
2021-09-04 14:23:09 +08:00
find %{buildroot} -type f -name '*.so' -exec strip '{}' ';'
2021-09-16 03:26:43 +00:00
cd $RPM_BUILD_ROOT/usr
file `find -type f`| grep -w ELF | awk -F":" '{print $1}' | for i in `xargs`
do
chrpath -d $i
done
cd -
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
echo "%{_libdir}/%{name}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
2019-11-19 11:56:51 +08:00
%files -n python3-scipy
%license LICENSE.txt
%{python3_sitearch}/scipy
%{python3_sitearch}/*.dist-info
2021-09-16 03:26:43 +00:00
%config(noreplace) /etc/ld.so.conf.d/*
2019-11-19 11:56:51 +08:00
%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
- Fix scipy compile error in cython3
2023-09-25 11:11:24 +08:00
* Mon Sep 11 2023 liyunfei <liyunfei@huawei.com> - 1.10.1-2
- add clang compile support
2023-07-20 09:13:04 +08:00
* Mon Jul 10 2023 wangkai <13474090681@163.com> - 1.10.1-1
- Update to 1.10.1
2021-12-13 17:26:43 +08:00
* Mon Dec 13 2021 zhouwenpei <zhouwenpei1@huawei.com> - 1.6.2-1
- upgrade to 1.6.2
2021-12-13 17:26:43 +08:00
2021-09-16 03:26:43 +00:00
* Thu Sep 16 2021 chenchen <chen_aka_jan@163.com> - 1.2.2-8
- del rpath for some binaries and bin
2021-09-04 14:23:09 +08:00
* Sat Sep 4 2021 zhangtao <zhangtao221@huawei.com> - 1.2.2-7
- Strip Dynamic library
* Mon Aug 02 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.2.2-6
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
2021-09-16 03:26:43 +00:00
* Sun Aug 01 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.2.2-5
2021-08-01 12:30:29 +08:00
- Fix build error with gcc 10
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.2.2-4
- Completing build dependencies to fix git commands missing error
2020-10-29 17:25:43 +08:00
* Tue Oct 27 2020 huanghaitao <huanghaitao8@openeuler.org> - 1.2.2-3
- Disable python2 module
2020-03-23 23:22:55 +08:00
* Mon Mar 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.2.2-2
- Add macros of python2
* Mon Nov 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.2-1
2019-11-19 11:56:51 +08:00
- Package init