Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37566430
en ru br
ALT Linux repositórios
S:1.10.1-alt1

Group :: Development/Python3
RPM: python3-module-scipy

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _unpackaged_files_terminate_build 1

%def_without check
%ifarch x86_64 aarch64
%def_with pythran
%else
%def_without pythran
%endif

%define modname scipy
%define ver_major 1.10
%define ver_minor 0

%define numpy_version 1.16.5

Name: python3-module-%modname
Version: %ver_major.%ver_minor
Release: alt1

Summary: SciPy is the library of scientific codes
License: BSD-3-Clause
Group: Development/Python3

Url: https://www.scipy.org/
VCS: git://github.com/scipy/scipy.git
Patch0: %name-%version-%release.patch
Source0: %name-%version.tar
Source1: site.cfg
# submodules  by update-submodules.sh
Source2: %name-%version-doc-source-_static-scipy-mathjax.tar
Source3: %name-%version-scipy-_lib-boost.tar
Source4: %name-%version-scipy-_lib-highs.tar
Source5: %name-%version-scipy-_lib-unuran.tar
Source6: %name-%version-scipy-sparse-linalg-_propack-PROPACK.tar

# will be released with scipy 1.8.0


BuildRequires(pre): rpm-macros-make
BuildRequires(pre): rpm-macros-sphinx3
BuildRequires(pre): rpm-build-python3
BuildRequires: gcc-c++ gcc-fortran
BuildRequires: python3-devel
BuildRequires: libnumpy-py3-devel python3-module-numpy-testing
BuildRequires: python3-module-Cython
BuildRequires: python3-module-html5lib
BuildRequires: python3-module-matplotlib
BuildRequires: python3-module-pybind11
%if_with pythran
BuildRequires: python3-module-pythran
%endif
BuildRequires: libflexiblas-devel

%ifarch %e2k
BuildRequires: eml-devel-compat-lapack
BuildRequires: eml-devel-compat-blas
%else
BuildRequires: liblapack-devel
%endif

Requires: %python3_sitelibdir_noarch
Requires: python3-module-numpy >= %numpy_version
%add_python3_req_skip _min_spanning_tree _shortest_path _tools
%add_python3_req_skip _traversal sympy
%add_python3_req_skip distutils
%if_with check
BuildRequires: /usr/bin/pytest3
BuildRequires: python3-module-numpy-tests
BuildRequires: /proc
BuildRequires: python3-module-pooch
%add_python3_req_skip scipy.fft.tests
%else
%add_python3_req_skip numpy.testing
%endif

%description
SciPy is the library of scientific codes built on top of NumPy.

%package devel
Summary: Development files of SciPy (Python 3)
Group: Development/Python3
Requires: %name = %EVR
Requires: python3-devel
Requires: libnumpy-py3-devel

%description devel
SciPy is the library of scientific codes built on top of NumPy.

This package contains development files of SciPy.

%prep
%setup -a2 -a3 -a4 -a5 -a6
%patch0 -p1
install -p -m644 %SOURCE1 .
sed -i 's| at LIBDIR at |%_libdir|g' site.cfg doc/Makefile
sed -i 's| at PYVER at |%_python_version|g' doc/Makefile
sed -i 's| at PYSUFF at |3|' site.cfg

%if_without check
# Find and comment out Pytest imports, since main package should
# not require test deps
grep -zPqsr '[ ]*from scipy._lib._testutils import PytestTester\n[ ]*test = PytestTester\(__name__\)\n[ ]*del PytestTester\n' || exit 1
grep -zPrl '[ ]*from scipy._lib._testutils import PytestTester\n[ ]*test = PytestTester\(__name__\)\n[ ]*del PytestTester\n' | xargs \
sed -i '/from scipy._lib._testutils import PytestTester/,/del PytestTester/ {s/^/# /}'
%endif

mkdir -p ~/.matplotlib
cp %_datadir/matplotlib/mpl-data/matplotlibrc \
~/.matplotlib/
sed -i 's|^\(backend\).*|\1 : Agg|' ~/.matplotlib/matplotlibrc

%build
%ifarch %e2k
# as of lcc 1.25.17 (mcst#6255)
%add_optflags -DPOCKETFFT_NO_VECTORS
# fixup "EML instead of OpenBLAS/LAPACK" setup
sed -i -e 's/lapack, /clapack, eml_algebra_mt, /g' -e 's/openblas, /blas, /g' site.cfg
%endif

export SCIPY_USE_PYTHRAN=0%{?with_pythran}
%add_optflags -I%_includedir/suitesparse -fno-strict-aliasing %optflags_shared
%python3_build_debug build_ext build_py build_clib \
config_fc --fcompiler=gnu95

%install
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
%python3_install install_lib install_headers \
install_data config_fc
find %buildroot%python3_sitelibdir -type f -exec \
sed -i 's|#! %_bindir/env python|#!%_bindir/python3|' -- '{}' + ||:
find %buildroot%python3_sitelibdir -type f -exec \
sed -i 's|#!%_bindir/env python|#!%_bindir/python3|' -- '{}' + ||:

# headers

pushd %modname
for i in $(find ./ -name '*.h'); do
   dir=$(echo $i|sed 's|\(.*\)/.*|\1|')
   install -d %buildroot%_includedir/%modname-py3/$dir
   install -p -m644 $i \
%buildroot%_includedir/%modname-py3/$dir
done
popd

install -p -m644 $(find ./ -name fortranobject.h | head -n 1) \
%buildroot%_includedir/%modname-py3
pushd %buildroot%python3_sitelibdir/%modname/sparse/csgraph
for i in $(ls *.so); do
ln -s %python3_sitelibdir/%modname/sparse/csgraph/$i \
%buildroot%python3_sitelibdir/
done
popd

%if_without check
# don't package tests and tests'check
for i in $(find %buildroot%python3_sitelibdir \
              -name tests -type d \
              -o -name 'conftest.*' -type f \
              -o -name '_testutils.*' -type f \
              -o -name 'gammainc_data.*' -type f \
              -o -name '_mptestutils.*' -type f)
do
rm -r "$i"
done
%endif

%find_lang %name

%check
pushd %{buildroot}/%{python3_sitelibdir}
pytest3 scipy
popd


%files -f %name.lang
%python3_sitelibdir/*

%files devel
%_includedir/%modname-py3

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009