/[packages]/cauldron/python-scipy/current/SPECS/python-scipy.spec
ViewVC logotype

Contents of /cauldron/python-scipy/current/SPECS/python-scipy.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1738751 - (show annotations) (download)
Mon Aug 2 23:37:31 2021 UTC (2 years, 8 months ago) by luigiwalser
File size: 3930 byte(s)
1.6.2
1 # please check if atlas is enabled or not in numpy
2 # it's better to be in sync with numpy
3 # latest atlas (3.10.2) seems to not work correctly with scipy
4 %define enable_atlas 0
5
6 #(eatdirt) Requires a python-numpydoc which is currently broken
7 %define enable_doc 0
8
9 # disable test on build system to speed build
10 # but they where ok on local iurt build
11 %define enable_test 0
12
13 %define pypi_name scipy
14
15 %define Werror_cflags %nil
16
17 Summary: Scientific tools for Python
18 Name: python-%{pypi_name}
19 Group: Development/Python
20 Version: 1.6.2
21 Release: %mkrel 1
22 License: BSD and Boost and Public Domain
23 Url: https://pypi.org/project/scipy/
24 Source0: %{pypi_source}
25 Patch1: scipy-1.6.1-fix-linking.patch
26 BuildRequires: swig
27 %if %enable_atlas
28 BuildRequires: libatlas-devel
29 %else
30 BuildRequires: blas-devel
31 %endif
32 BuildRequires: lapack-devel
33 BuildRequires: gcc-gfortran >= 4.0
34 BuildRequires: pkgconfig(netcdf)
35 BuildRequires: suitesparse-devel
36 %if %enable_doc
37 BuildRequires: python3dist(sphinx)
38 BuildRequires: python3dist(matplotlib)
39 BuildRequires: python3dist(numpydoc)
40 %endif
41
42 BuildRequires: python3-devel
43 BuildRequires: python3-numpy-f2py
44 BuildRequires: python3-numpy-devel >= 1.9.2
45 BuildRequires: python3dist(pybind11) >= 2.4.0
46 BuildRequires: python3dist(setuptools)
47 BuildRequires: python3dist(cython)
48
49 %description
50 SciPy is an open source library of scientific tools for Python. SciPy
51 supplements the popular numpy module, gathering a variety of high
52 level science and engineering modules together as a single
53 package. SciPy includes modules for graphics and plotting,
54 optimization, integration, special functions, signal and image
55 processing, genetic algorithms, ODE solvers, and others.
56
57 %package -n python3-scipy
58 Summary: Scipy: Scientific Tools for Python
59 Group: Development/Python
60 %{?python_provide:%python_provide python3-scipy}
61 Requires: python3dist(numpy)
62 Requires: python3-numpy-f2py
63
64 %description -n python3-scipy
65 Scipy is open-source software for mathematics, science, and
66 engineering. The core library is NumPy which provides convenient and
67 fast N-dimensional array manipulation. The SciPy library is built to
68 work with NumPy arrays, and provides many user-friendly and efficient
69 numerical routines such as routines for numerical integration and
70 optimization. Together, they run on all popular operating systems, are
71 quick to install, and are free of charge. NumPy and SciPy are easy to
72 use, but powerful enough to be depended upon by some of the world's
73 leading scientists and engineers.
74
75 %if %enable_doc
76 %package doc
77 Summary: Documentation for scipy
78 Group: Development/Python
79 BuildArch: noarch
80
81 %description doc
82 This package contains documentation for Scipy
83 %endif
84
85 %prep
86 %autosetup -n %{pypi_name}-%{version} -p1
87
88 cat > site.cfg << EOF
89 [amd]
90 library_dirs = %{_libdir}
91 include_dirs = %{_includedir}/suitesparse
92 amd_libs = amd
93
94 [umfpack]
95 library_dirs = %{_libdir}
96 include_dirs = %{_includedir}/suitesparse
97 umfpack_libs = umfpack
98 EOF
99
100 %build
101 %if ! %enable_atlas
102 %define extraflags "-DNO_ATLAS_INFO"
103 %endif
104
105 env CFLAGS="$RPM_OPT_FLAGS -lm" \
106 FFLAGS="$RPM_OPT_FLAGS -fPIC -fallow-argument-mismatch" \
107 %{__python3} setup.py config_fc \
108 --fcompiler=gnu95 --noarch \
109 build
110
111 %install
112 %py3_install
113
114 # Some files got ambiguous python shebangs, we fix them after everything else is done
115 pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
116
117 # Remove doc files that should be in %%doc:
118 %__rm -f %{buildroot}%{python3_sitearch}/%{pypi_name}/*.txt
119
120 %if %enable_doc
121 pushd doc
122 PYTHONPATH=%{buildroot}%{python3_sitearch}:%{python3_sitearch}:%{python3_sitelib} %__make html
123 popd
124 %endif
125
126 %if %enable_test
127 %check
128 mkdir test
129 cd test
130 PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} %{__python3} -c "import scipy; scipy.test('full')"
131 %endif
132
133 %files -n python3-scipy
134 %doc LICENSE.txt
135 %{python3_sitearch}/%{pypi_name}/*
136 %{python3_sitearch}/*.egg-info
137
138 %if %enable_doc
139 %files doc
140 %doc doc/build/html/*
141 %endif

  ViewVC Help
Powered by ViewVC 1.1.30