Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2826d890bfb3d2caf2c9e18d7459cd04 > files > 1

python-scipy-1.2.2-1.mga7.src.rpm

# we don't want to provide private python extension libs
%define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so

# please check if atlas is enabled or not in numpy
# it's better to be in sync with numpy
# latest atlas (3.10.2) seems to not work correctly with scipy
%define enable_atlas 0


#(eatdirt) Requires a python-numpydoc which is currently broken
%define enable_doc 0

# disable test on build system to speed build
# but they where ok on local iurt build
%define enable_test 0

%define module	scipy

%define Werror_cflags %nil

Summary:	Scientific tools for Python
Name:		python-%{module}
Group:		Development/Python
Version:	1.2.2
Release:	%mkrel 1
License:	BSD
Url:		http://www.scipy.org

Source0:	https://github.com/scipy/scipy/releases/download/v%{version}/%{module}-%{version}.tar.gz


Obsoletes:	python-SciPy <= %{version}-%{release}
Obsoletes:	python-symeig <= %{version}%{release}


BuildRequires:	swig
%if %enable_atlas
BuildRequires:	libatlas-devel
%else
BuildRequires:	blas-devel
%endif 
BuildRequires:	lapack-devel
BuildRequires:	python2-numpy-devel >= 1.9.2
BuildRequires:	python2-numpy-f2py
BuildRequires:	gcc-gfortran >= 4.0
BuildRequires:	pkgconfig(netcdf)
BuildRequires:	python2dist(nose)
BuildRequires:	pkgconfig(python2)
BuildRequires:	suitesparse-devel
%if %enable_doc
BuildRequires:	texlive-dist
BuildRequires:	python2dist(sphinx)
BuildRequires:	python2dist(sphinx-rtd-theme)
BuildRequires:	python2dist(matplotlib)
BuildRequires:	python2dist(numpydoc)
BuildRequires:	python3dist(sphinx)
BuildRequires:	python3dist(sphinx-rtd-theme)
BuildRequires:	python3dist(matplotlib)
BuildRequires:	python3dist(numpydoc)
%endif
BuildRequires:	python2dist(cython)
BuildRequires:	python2dist(setuptools)

BuildRequires:	pkgconfig(python3)
BuildRequires:	python3dist(setuptools)
BuildRequires:	python3-numpy-f2py
BuildRequires:	python3-numpy-devel >= 1.9.2
BuildRequires:	python3dist(nose)
BuildRequires:	python3dist(cython)

%description
SciPy is an open source library of scientific tools for Python. SciPy
supplements the popular numpy module, gathering a variety of high
level science and engineering modules together as a single
package. SciPy includes modules for graphics and plotting,
optimization, integration, special functions, signal and image
processing, genetic algorithms, ODE solvers, and others.

%package -n python2-scipy
Summary:	Scipy: Scientific Tools for Python
Group:		Development/Python
License:	BSD and LGPLv2+
Requires:	python2dist(numpy)
Requires:	python2-numpy-f2py
Obsoletes:	python-scipy <= %{version}-%{release}
%{?python_provide:%python_provide python2-scipy}

%description -n python2-scipy
Scipy is open-source software for mathematics, science, and
engineering. The core library is NumPy which provides convenient and
fast N-dimensional array manipulation. The SciPy library 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.

%package -n python3-scipy
Summary:	Scipy: Scientific Tools for Python
Group:		Development/Python
License:	BSD and LGPLv2+
Requires:	python3dist(numpy)
Requires:	python3-numpy-f2py

%description -n python3-scipy
Scipy is open-source software for mathematics, science, and
engineering. The core library is NumPy which provides convenient and
fast N-dimensional array manipulation. The SciPy library 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.

%if %enable_doc
%package doc
Summary:	Documentation for scipy
Group:		Development/Python
BuildArch:	noarch

%description doc
This package contains documentation for Scipy
%endif

%prep
%setup -q -n %{module}-%{version}
cat > site.cfg << EOF

[amd]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse
amd_libs = amd

[umfpack]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse
umfpack_libs = umfpack
EOF

%build

%if %enable_atlas
%define extraflags ""
%else
%define extraflags "-DNO_ATLAS_INFO"
%endif

env FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    CFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
    %{__python3} setup.py config_fc --fcompiler=gnu95 --noarch build

env FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    CFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
    %{__python2} setup.py config_fc --fcompiler=gnu95 --noarch build


%install
#(eatdirt) let's try to revert this, the time has come :)
### first install python3 so the binaries are overwritten by the python2 ones

env FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    CFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
    %{__python2} setup.py install --root=%{buildroot} 


env FFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    CFLAGS="%{optflags} -fPIC -O3 %extraflags" \
    ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
    %{__python3} setup.py install --root=%{buildroot}


# Remove doc files that should be in %%doc:
%__rm -f %{buildroot}%{python_sitearch}/%{module}/*.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/*.txt

%if %enable_doc
pushd doc
PYTHONPATH=%{buildroot}%{python2_sitearch}:%{python2_sitearch}:%{python2_sitelib} %__make html
popd
%endif

%if %enable_test
%check
mkdir test
cd test
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} %{__python3} -c "import scipy; scipy.test('full')"

mkdir test
cd test
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -c "import scipy; scipy.test('full')"
%endif

%files -n python2-scipy
%doc LICENSE.txt 
%dir %{python2_sitearch}/%{module}
%{python2_sitearch}/%{module}/*
%{python2_sitearch}/%{module}-*.egg-info

%files -n python3-scipy
%doc LICENSE.txt
%{python3_sitearch}/%{module}/*
%{python3_sitearch}/*.egg-info

%if %enable_doc
%files doc
%doc doc/build/html/*
%endif


%changelog
* Sat Nov 14 2020 philippem <philippem> 1.2.2-1.mga7
+ Revision: 1645913
- update to 1.2.2 mga#24729

* Mon Jan 07 2019 shlomif <shlomif> 1.2.0-1.mga7
+ Revision: 1350420
- Rebuild for python3 3.7

* Sun Sep 23 2018 umeabot <umeabot> 1.1.0-2.mga7
+ Revision: 1300592
- Mageia 7 Mass Rebuild

* Fri Aug 03 2018 eatdirt <eatdirt> 1.1.0-1.mga7
+ Revision: 1247083
- Upgrade to version 1.1.0
+ daviddavid <daviddavid>
- use new python provides

* Fri Oct 13 2017 joequant <joequant> 1.0.0rc1-0.1.mga7
+ Revision: 1171587
- fix version
- upgrade to 1.0.0rc1

* Wed Sep 13 2017 tv <tv> 0.19.1-2.mga7
+ Revision: 1153441
- add missing provides thus fixing tons of deps

* Sat Sep 09 2017 joequant <joequant> 0.19.1-1.mga7
+ Revision: 1152234
- upgrade to 0.19.1

* Sat Sep 09 2017 joequant <joequant> 0.17.1-6.mga7
+ Revision: 1152200
- update with gcc7/binutils

* Sun Aug 06 2017 philippem <philippem> 0.17.1-5.mga7
+ Revision: 1137699
- enable doc, texlive is ok
- enable doc, texlive is ok

* Sun Aug 06 2017 philippem <philippem> 0.17.1-4.mga7
+ Revision: 1137628
- disable doc, texlive is broken
+ pterjan <pterjan>
- Rebuild for python 3.6

* Thu May 26 2016 philippem <philippem> 0.17.1-3.mga6
+ Revision: 1018671
- disable test on build system to speed build but they where ok on local iurt build
- disable atlas as in numpy, enable doc and tests

* Tue May 24 2016 philippem <philippem> 0.17.1-2.mga6
+ Revision: 1018129
- rebuild without tests for arm

* Mon May 23 2016 philippem <philippem> 0.17.1-1.mga6
+ Revision: 1018037
- update to 0.17.1, disable doc, enable tests
+ joequant <joequant>
- rebuild with new atlas and blas
+ tv <tv>
- rebuild for new atlas

* Sun Feb 28 2016 philippem <philippem> 0.17.0-2.mga6
+ Revision: 980379
- rebuild with new python macros
- update to 0.17.0

* Thu Jan 28 2016 barjac <barjac> 0.16.1-2.mga6
+ Revision: 928439
- rebuild for arm

* Wed Oct 28 2015 joequant <joequant> 0.16.1-1.mga6
+ Revision: 895980
- upgrade to 0.16.1 and fix requires

* Thu Oct 08 2015 tv <tv> 0.16.0-4.mga6
+ Revision: 887728
- rebuild for python 3.5

* Thu Oct 08 2015 joequant <joequant> 0.16.0-3.mga6
+ Revision: 887622
- add rtd theme
- upgrade to python 3.5

* Sat Sep 19 2015 philippem <philippem> 0.16.0-2.mga6
+ Revision: 881355
- build with gcc5

* Sat Aug 08 2015 joequant <joequant> 0.16.0-1.mga6
+ Revision: 861683
- upgrade to 0.16.0

* Wed Jul 01 2015 joequant <joequant> 0.15.1-1.mga6
+ Revision: 849314
- upgrade 0.15.1

* Wed Oct 15 2014 umeabot <umeabot> 0.14.0-5.mga5
+ Revision: 743777
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.14.0-4.mga5
+ Revision: 729721
- rebuild for missing pythoneggs deps
+ umeabot <umeabot>
- Mageia 5 Mass Rebuild

* Tue Aug 19 2014 philippem <philippem> 0.14.0-2.mga5
+ Revision: 665621
- add doc subpackage, disable tests on BS (ok locally under iurt)

* Wed Jul 16 2014 philippem <philippem> 0.14.0-1.mga5
+ Revision: 653310
- update to 0.14.0

* Sat May 31 2014 pterjan <pterjan> 0.13.3-2.mga5
+ Revision: 629001
- Rebuild for new Python

* Fri Mar 07 2014 philippem <philippem> 0.13.3-1.mga5
+ Revision: 601063
- update to 0.13.3

* Tue Nov 19 2013 philippem <philippem> 0.13.0-4.mga4
+ Revision: 551935
- add requires on python-devel

* Wed Nov 13 2013 philippem <philippem> 0.13.0-3.mga4
+ Revision: 551061
- add missing requires

* Fri Nov 01 2013 philippem <philippem> 0.13.0-2.mga4
+ Revision: 548720
- add missing requires

* Tue Oct 29 2013 philippem <philippem> 0.13.0-1.mga4
+ Revision: 547868
- Update to 0.13.0
- Update to 0.13.0

* Tue Oct 22 2013 umeabot <umeabot> 0.12.0-5.mga4
+ Revision: 546139
- Mageia 4 Mass Rebuild

* Thu Oct 17 2013 philippem <philippem> 0.12.0-4.mga4
+ Revision: 502197
- fix dependencies

* Tue Oct 15 2013 pterjan <pterjan> 0.12.0-3.mga4
+ Revision: 499335
- Rebuild to add different pythonegg provides for python 2 and 3
+ philippem <philippem>
- cleaning spec

* Mon Jul 01 2013 philippem <philippem> 0.12.0-1.mga4
+ Revision: 449510
- fix group, add Python 3 tests
- add python 3
- update to 0.12.0

* Fri Mar 29 2013 eatdirt <eatdirt> 0.9.0-6.mga3
+ Revision: 406070
- Remove dependence to ATLAS, fix compilation failure

* Sun Jan 13 2013 umeabot <umeabot> 0.9.0-5.mga3
+ Revision: 379476
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Dec 23 2012 barjac <barjac> 0.9.0-4.mga3
+ Revision: 334137
- rebuild for new umfpack
- spec clean

* Tue Jun 21 2011 ahmad <ahmad> 0.9.0-3.mga2
+ Revision: 110919
- Rebuild against the new umfpack lib major

* Tue May 10 2011 ahmad <ahmad> 0.9.0-2.mga1
+ Revision: 96865
- Drop old/unneeded scriptlets
- Drop the buildroot declaration
- imported package python-scipy