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

Annotation of /cauldron/python-matplotlib/current/SPECS/python-matplotlib.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1846075 - (hide annotations) (download)
Wed Apr 6 03:37:16 2022 UTC (3 months ago) by umeabot
File size: 13870 byte(s)
Mageia 9 Mass Rebuild
1 joequant 1005800 %global with_html 0
2 grenoya 89884
3 wally 1441380 # It seems like there's some kind of weird occasional error where a
4     # build (often aarch64 or ppc64) will fail in one of the Stix font
5     # tests with a huge RMS difference, but if you run the same build again,
6     # you won't get the same error. Unless someone can figure out what's
7     # going on, we just have to keep re-running the build until it doesn't
8     # happen.
9 wally 1441592 %global run_tests 0
10 wally 1441380
11     # the default backend; one of GTK3Agg GTK3Cairo MacOSX Qt4Agg Qt5Agg TkAgg
12     # WXAgg Agg Cairo PS PDF SVG
13 joequant 1005800 %global backend TkAgg
14 joequant 795013
15 joequant 1005800 %if "%{backend}" == "TkAgg"
16     %global backend_subpackage tk
17     %else
18     % if "%{backend}" == "Qt4Agg"
19     %global backend_subpackage qt4
20     % else
21     % if "%{backend}" == "Qt5Agg"
22     %global backend_subpackage qt5
23 wally 1441380 % else
24     % if "%{backend}" == "WXAgg"
25     %global backend_subpackage wx
26     % endif
27 joequant 1005800 % endif
28     % endif
29     %endif
30 joequant 803919
31 wally 1441380 # https://fedorahosted.org/fpc/ticket/381
32 joequant 1005800 %global with_bundled_fonts 1
33 joequant 803919
34 joequant 1005800 # Use the same directory of the main package for subpackage licence and docs
35     %global _docdir_fmt %{name}
36 joequant 803919
37 wally 1441380 #global rctag rc2
38    
39     # Updated test images for new FreeType.
40 guillomovitch 1624288 %global mpl_images_version 3.3.0
41 wally 1441380
42     # The version of FreeType in this Fedora branch.
43 guillomovitch 1624288 %global ftver 2.10.2
44 wally 1441380
45 joequant 1005800 Name: python-matplotlib
46 guillomovitch 1648130 Version: 3.3.3
47 umeabot 1846075 Release: %mkrel 4
48 joequant 1005800 Summary: Python 2D plotting library
49     Group: Development/Python
50     # qt4_editor backend is MIT
51     License: Python and MIT
52 danf 1787823 URL: https://matplotlib.org/
53 wally 1441380 Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}/matplotlib-%{version}%{?rctag}.tar.gz
54 joequant 1005800 Source1: setup.cfg
55 philippem 675153
56 wally 1441380 # Fedora-specific patches; see:
57     # https://github.com/fedora-python/matplotlib/tree/fedora-patches
58     # Updated test images for new FreeType.
59     Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz
60     # Increase tolerances for new FreeType everywhere:
61 wally 1598196 Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
62 wally 1441380
63 wally 1598231 # Mageia patches
64 guillomovitch 1624288 Patch5000: matplotlib-matplotlib-3.3.1-pyparsing-reqs.patch
65 wally 1598231
66 wally 1441380 BuildRequires: gcc
67     BuildRequires: gcc-c++
68     BuildRequires: locales-en
69 joequant 1005800 BuildRequires: freetype-devel
70 wally 1441380 BuildRequires: libpng-devel
71 joequant 1005800 BuildRequires: qhull-devel
72 wally 1441380 BuildRequires: texlive
73     BuildRequires: texlive-dist
74 joequant 1005800 BuildRequires: x11-server-xvfb
75 wally 1441380 BuildRequires: zlib-devel
76 wally 1441573 BuildRequires: fonts-ttf-dejavu
77 joequant 795013
78 joequant 1176862 %description
79 wally 1598196 Matplotlib is a Python 2D plotting library which produces publication
80 joequant 1176862 quality figures in a variety of hardcopy formats and interactive
81 wally 1598196 environments across platforms. Matplotlib can be used in Python
82     scripts, the Python and IPython shell, web application servers, and
83     various graphical user interface toolkits.
84 joequant 1176862
85     Matplotlib tries to make easy things easy and hard things possible.
86     You can generate plots, histograms, power spectra, bar charts,
87     errorcharts, scatterplots, etc, with just a few lines of code.
88    
89 wally 1441380 %package -n python3-matplotlib-data
90 joequant 1005800 Summary: Data used by python-matplotlib
91 tv 1178941 BuildArch: noarch
92 philippem 1007671 Group: Development/Python
93 joequant 1005800 %if %{with_bundled_fonts}
94 wally 1441380 Requires: python3-matplotlib-data-fonts = %{version}-%{release}
95 joequant 1005800 %endif
96 wally 1441380 %{?python_provide:%python_provide python3-matplotlib-data}
97 philippem 334342
98 wally 1441380 %description -n python3-matplotlib-data
99 joequant 1005800 %{summary}
100 philippem 334342
101 joequant 1005800 %if %{with_bundled_fonts}
102 wally 1441380 %package -n python3-matplotlib-data-fonts
103 joequant 1005800 Summary: Fonts used by python-matplotlib
104 wally 1441380 # STIX and Computer Modern is OFL
105     # DejaVu is Bitstream Vera and Public Domain
106     License: OFL and Bitstream Vera and Public Domain
107 tv 1178941 BuildArch: noarch
108 wally 1441380 Requires: python3-matplotlib-data = %{version}-%{release}
109     %{?python_provide:%python_provide python3-matplotlib-data-fonts}
110 grenoya 89884
111 wally 1441380 %description -n python3-matplotlib-data-fonts
112 joequant 1005800 %{summary}
113     %endif
114 grenoya 89884
115 joequant 1005800 %package -n python3-matplotlib
116     %{?python_provide:%python_provide python3-matplotlib}
117     Summary: Python 2D plotting library
118 joequant 1005811 Group: Development/Python
119 wally 1441380 BuildRequires: python3-cairo
120 guillomovitch 1624293 BuildRequires: python3-certifi >= 2020.06.20
121 wally 1441380 BuildRequires: python3-cycler >= 0.10.0
122     BuildRequires: python3-dateutil
123 joequant 1005800 BuildRequires: python3-devel
124 wally 1441380 BuildRequires: python3-setuptools
125 wally 1598196 BuildRequires: python3-gobject
126 wally 1441380 BuildRequires: python3-kiwisolver
127 wally 1441506 BuildRequires: python3-numpy-devel
128 wally 1441380 BuildRequires: python3-pillow
129     BuildRequires: python3-pyparsing
130     BuildRequires: python3-pytz
131     BuildRequires: python3-sphinx
132 wally 1441563 Requires: fonts-ttf-dejavu
133 wally 1441564 # for dvipng
134     Requires: texlive
135 wally 1441380 Requires: python3-matplotlib-data = %{version}-%{release}
136     Requires: python3-cairo
137     Requires: python3-cycler >= 0.10.0
138     Requires: python3-dateutil
139     Requires: python3-kiwisolver
140     Requires: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
141     %if %{run_tests}
142     BuildRequires: python3-pytest
143 wally 1598196 BuildRequires: python3-pytest-rerunfailures
144     BuildRequires: python3-pytest-timeout
145 wally 1441380 BuildRequires: python3-pytest-xdist
146     %endif
147     Requires: python3-numpy
148     Recommends: python3-pillow
149     Requires: python3-pyparsing
150     %if !%{with_bundled_fonts}
151     Requires: stix-math-fonts
152     %else
153     Provides: bundled(stix-math-fonts)
154     %endif
155     %{?python_provide:%python_provide python3-matplotlib}
156 grenoya 89884
157 joequant 1005800 %description -n python3-matplotlib
158 wally 1598196 Matplotlib is a Python 2D plotting library which produces publication
159 philippem 449880 quality figures in a variety of hardcopy formats and interactive
160 wally 1598196 environments across platforms. Matplotlib can be used in Python
161     scripts, the Python and IPython shell, web application servers, and
162     various graphical user interface toolkits.
163 philippem 449880
164     Matplotlib tries to make easy things easy and hard things possible.
165     You can generate plots, histograms, power spectra, bar charts,
166     errorcharts, scatterplots, etc, with just a few lines of code.
167    
168 joequant 1005800 %package -n python3-matplotlib-qt5
169     Summary: Qt5 backend for python3-matplotlib
170 joequant 1005811 Group: Development/Python
171 tv 1178941 BuildRequires: python3-qt5
172 joequant 1005800 Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
173     Requires: python3-qt5
174 tv 1178941 %{?python_provide:%python_provide python3-matplotlib-qt5}
175 philippem 449880
176 joequant 1005800 %description -n python3-matplotlib-qt5
177 philippem 449880 %{summary}
178    
179 joequant 1005800 %package -n python3-matplotlib-gtk3
180     Summary: GTK3 backend for python3-matplotlib
181 joequant 1005811 Group: Development/Python
182 joequant 1005800 # This should be converted to typelib(Gtk) when supported
183 wally 1441380 BuildRequires: gtk3-devel
184 wally 1598196 BuildRequires: python3-gobject
185     Requires: python3-gobject%{?_isa}
186 wally 1441380 Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
187 tv 1178941 %{?python_provide:%python_provide python3-matplotlib-gtk3}
188 joequant 1005800
189     %description -n python3-matplotlib-gtk3
190     %{summary}
191    
192     %package -n python3-matplotlib-tk
193     Summary: Tk backend for python3-matplotlib
194 joequant 1005811 Group: Development/Python
195 tv 1178941 BuildRequires: python3-tkinter
196 joequant 1005800 Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
197     Requires: python3-tkinter
198 tv 1178941 %{?python_provide:%python_provide python3-matplotlib-tk}
199 joequant 1005800
200     %description -n python3-matplotlib-tk
201     %{summary}
202    
203 wally 1441380 %package -n python3-matplotlib-wx
204     Summary: WX backend for python3-matplotlib
205     BuildRequires: python3-wxpython4
206     Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
207     Requires: python3-wxpython4
208     %{?python_provide:%python_provide python3-matplotlib-wx}
209 philippem 1007553
210 wally 1441380 %description -n python3-matplotlib-wx
211     %{summary}
212    
213     %package -n python3-matplotlib-doc
214     Summary: Documentation files for python-matplotlib
215     %if %{with_html}
216     BuildRequires: dvipng
217     BuildRequires: graphviz
218     BuildRequires: python3-sphinx
219     BuildRequires: tex(latex)
220     BuildRequires: tex-preview
221     BuildRequires: js-jquery >= 3.2.1
222     BuildRequires: xstatic-jquery-ui-common
223     Requires: js-jquery >= 3.2.1
224     Requires: xstatic-jquery-ui-common
225     %endif
226     Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
227     %{?python_provide:%python_provide python3-matplotlib-doc}
228    
229     %description -n python3-matplotlib-doc
230     %{summary}
231    
232     %package -n python3-matplotlib-test-data
233     Summary: Test data for python3-matplotlib
234     Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
235     %{?python_provide:%python_provide python3-matplotlib-test-data}
236    
237     %description -n python3-matplotlib-test-data
238     %{summary}
239    
240    
241 grenoya 89884 %prep
242 wally 1441380 %autosetup -n matplotlib-%{version}%{?rctag} -N
243 daviddavid 887337
244 wally 1441380 # Fedora-specific patches follow:
245     # Updated test images for new FreeType.
246     %patch1002 -p1
247     gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
248 wally 1598231 %patch5000 -p1
249 wally 1441380 rm -r extern/libqhull
250    
251 joequant 803919 # Copy setup.cfg to the builddir
252 wally 1441380 cp -p %{SOURCE1} setup.cfg
253 joequant 803919
254    
255 wally 1441380 %build
256 wally 1474402 %set_build_flags
257 wally 1441380 export http_proxy=http://127.0.0.1/
258 philippem 449880
259 joequant 803919 MPLCONFIGDIR=$PWD \
260 wally 1441380 xvfb-run %{__python3} setup.py build
261 philippem 472595 %if %{with_html}
262 grenoya 89884 # Need to make built matplotlib libs available for the sphinx extensions:
263     pushd doc
264 joequant 1005800 MPLCONFIGDIR=$PWD/.. \
265     PYTHONPATH=`realpath ../build/lib.linux*` \
266 wally 1441380 %{__python3} make.py html
267 grenoya 89884 popd
268 philippem 472595 %endif
269 joequant 1005800 # Ensure all example files are non-executable so that the -doc
270     # package doesn't drag in dependencies
271     find examples -name '*.py' -exec chmod a-x '{}' \;
272 grenoya 89884
273 wally 1441380 %install
274     export http_proxy=http://127.0.0.1/
275 joequant 803919
276 joequant 1005800 MPLCONFIGDIR=$PWD \
277 wally 1441380 %{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
278     chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py
279 joequant 1005800 mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib
280 wally 1441380 mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \
281 joequant 1005800 %{buildroot}%{_datadir}/matplotlib
282 wally 1629378 ln -s %{_datadir}/matplotlib/mpl-data %{buildroot}%{python3_sitearch}/matplotlib/mpl-data
283 joequant 1005800 %if !%{with_bundled_fonts}
284     rm -rf %{buildroot}%{_datadir}/matplotlib/mpl-data/fonts
285     %endif
286 joequant 803919
287 joequant 1005800 %if %{run_tests}
288     %check
289 wally 1441380 # These files confuse pytest, and we want to test the installed copy.
290     rm -rf build*/
291 philippem 450088
292 wally 1441380 export http_proxy=http://127.0.0.1/
293     # Skips:
294     # * test_invisible_Line_rendering: Checks for "slowness" that often fails on a
295     # heavily-loaded builder.
296     # * wxagg is broken on ppc64le:
297     # https://bugzilla.redhat.com/show_bug.cgi?id=1738752
298 joequant 1005800 MPLCONFIGDIR=$PWD \
299 wally 1629369 MATPLOTLIBRC=%{buildroot}%{_datadir}/matplotlib/mpl-data/matplotlibrc \
300 joequant 1005800 PYTHONPATH=%{buildroot}%{python3_sitearch} \
301 wally 1441380 PYTHONDONTWRITEBYTECODE=1 \
302     xvfb-run -a -s "-screen 0 640x480x24" \
303     %{__python3} tests.py -ra -n $(getconf _NPROCESSORS_ONLN) \
304 wally 1598196 -m 'not network' \
305     -k 'not test_invisible_Line_rendering and not Qt5Agg'
306     # Run Qt5Agg tests separately to not conflict with Qt4 tests.
307     MPLCONFIGDIR=$PWD \
308 wally 1629369 MATPLOTLIBRC=%{buildroot}%{_datadir}/matplotlib/mpl-data/matplotlibrc \
309 wally 1598196 PYTHONPATH=%{buildroot}%{python3_sitearch} \
310     PYTHONDONTWRITEBYTECODE=1 \
311     xvfb-run -a -s "-screen 0 640x480x24" \
312     %{__python3} tests.py -ra -n $(getconf _NPROCESSORS_ONLN) \
313     -m 'not network' -k 'Qt5Agg'
314 philippem 472595 %endif
315 grenoya 89884
316 wally 1441380 %files -n python3-matplotlib-data
317 joequant 1005800 %{_datadir}/matplotlib/mpl-data/
318     %if %{with_bundled_fonts}
319     %exclude %{_datadir}/matplotlib/mpl-data/fonts/
320     %endif
321    
322     %if %{with_bundled_fonts}
323 wally 1441380 %files -n python3-matplotlib-data-fonts
324 joequant 1005800 %{_datadir}/matplotlib/mpl-data/fonts/
325     %endif
326    
327 wally 1441380 %files -n python3-matplotlib-doc
328     %doc examples
329     %if %{with_html}
330     %doc doc/build/html/*
331     %endif
332 philippem 1007553
333 philippem 449880 %files -n python3-matplotlib
334 joequant 1005800 %license LICENSE/
335     %doc README.rst
336 philippem 449880 %{python3_sitearch}/*egg-info
337 joequant 1005800 %{python3_sitearch}/matplotlib-*-nspkg.pth
338 philippem 449880 %{python3_sitearch}/matplotlib/
339 wally 1441380 %exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
340 philippem 449880 %{python3_sitearch}/mpl_toolkits/
341 wally 1441380 %exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
342 philippem 449880 %{python3_sitearch}/pylab.py*
343 joequant 1005800 %{python3_sitearch}/__pycache__/*
344 wally 1441380 %exclude %{python3_sitearch}/matplotlib/backends/backend_qt4*.py
345 joequant 1005800 %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/backend_qt4*
346 wally 1441380 #exclude #{python3_sitearch}/matplotlib/backends/backend_qt5*.py
347     #exclude #{python3_sitearch}/matplotlib/backends/__pycache__/backend_qt5*
348     %exclude %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
349 joequant 1005800 %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/backend_gtk*
350 wally 1441380 %exclude %{python3_sitearch}/matplotlib/backends/_backend_tk.py
351     %exclude %{python3_sitearch}/matplotlib/backends/backend_tk*.py
352     %exclude %{python3_sitearch}/matplotlib/backends/tkagg.py
353     %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/_backend_tk.*
354     %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/backend_tk*.*
355 joequant 1005800 %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/tkagg.*
356 philippem 449880 %exclude %{python3_sitearch}/matplotlib/backends/_tkagg.*
357 wally 1441380 %exclude %{python3_sitearch}/matplotlib/backends/backend_wx*
358     %exclude %{python3_sitearch}/matplotlib/backends/wx_compat.*
359     %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/backend_wx*
360     %exclude %{python3_sitearch}/matplotlib/backends/__pycache__/wx_compat.*
361     %exclude %{_pkgdocdir}/*/
362 philippem 449880
363 wally 1441380 %files -n python3-matplotlib-test-data
364     %{python3_sitearch}/matplotlib/tests/baseline_images/
365     %{python3_sitearch}/mpl_toolkits/tests/baseline_images/
366 philippem 1007553
367 philippem 449880
368 wally 1441380 # This subpackage is empty because the Qt4 backend imports it, so we leave
369     # these files in the default package, and only use this one for dependencies.
370 joequant 1005800 %files -n python3-matplotlib-qt5
371     %{python3_sitearch}/matplotlib/backends/backend_qt5.*
372     %{python3_sitearch}/matplotlib/backends/__pycache__/backend_qt5.*
373     %{python3_sitearch}/matplotlib/backends/backend_qt5agg.*
374     %{python3_sitearch}/matplotlib/backends/__pycache__/backend_qt5agg.*
375    
376 philippem 1007553
377 joequant 1005800 %files -n python3-matplotlib-gtk3
378 wally 1441380 %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
379 joequant 1005800 %{python3_sitearch}/matplotlib/backends/__pycache__/backend_gtk*
380    
381 philippem 449880 %files -n python3-matplotlib-tk
382 wally 1441380 %{python3_sitearch}/matplotlib/backends/backend_tk*.py
383     %{python3_sitearch}/matplotlib/backends/_backend_tk.py
384     %{python3_sitearch}/matplotlib/backends/__pycache__/backend_tk*.*
385     %{python3_sitearch}/matplotlib/backends/__pycache__/_backend_tk.*
386 philippem 449880 %{python3_sitearch}/matplotlib/backends/_tkagg.*
387 wally 1598196
388     %files -n python3-matplotlib-wx
389     %{python3_sitearch}/matplotlib/backends/backend_wx*.py
390     %{python3_sitearch}/matplotlib/backends/__pycache__/backend_wx*

  ViewVC Help
Powered by ViewVC 1.1.28