]>
Commit | Line | Data |
---|---|---|
dc3cc1b8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests [many failures as of 1.5.3] | |
4 | ||
5 | # TODO: | |
6 | # - use system fonts (mpl-data/fonts/ttf/{STIX,cm}*.ttf) and metrics (mpl-data/fonts/{afm,pdfcorefonts}/*.afm) in mpl-data dir? | |
7 | # - make sure all dependencies that are available for Python3 are build for Python3 | |
8 | # and included in BR when neccessary | |
9 | %define module matplotlib | |
10 | Summary: Matlab(TM) style Python plotting package | |
11 | Summary(pl.UTF-8): Pakiet do rysowania w Pythonie podobny do Matlaba(TM) | |
12 | Name: python3-%{module} | |
13 | Version: 3.2.1 | |
5367455c | 14 | Release: 4 |
dc3cc1b8 JB |
15 | License: PSF |
16 | Group: Libraries/Python | |
17 | #Source0Download: https://github.com/matplotlib/matplotlib/releases | |
18 | Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz | |
19 | # Source0-md5: 9186b1e9f1fc7d555f2abf64b35dea5b | |
20 | Source1: https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip | |
21 | # Source1-md5: e0cfea21c9d1acd37fb58592f2c1f50d | |
22 | Patch0: %{name}-system-qhull.patch | |
23 | URL: https://matplotlib.org/ | |
24 | #BuildRequires: agg-devel | |
25 | BuildRequires: freetype-devel >= 1:2.6.1 | |
26 | BuildRequires: ghostscript | |
27 | BuildRequires: gtk+3 >= 3.0 | |
28 | BuildRequires: libpng-devel >= 1.2 | |
29 | BuildRequires: libstdc++-devel | |
30 | BuildRequires: ncurses-devel | |
31 | BuildRequires: pkgconfig | |
32 | # /usr/bin/pdftops | |
33 | BuildRequires: poppler-progs | |
34 | BuildRequires: python3 >= 1:3.6 | |
35 | BuildRequires: python3-2to3 | |
36 | BuildRequires: python3-PyQt4 | |
37 | BuildRequires: python3-PyQt5 | |
38 | BuildRequires: python3-cycler >= 0.10 | |
39 | BuildRequires: python3-dateutil >= 2.2 | |
40 | BuildRequires: python3-devel >= 1:3.6 | |
41 | BuildRequires: python3-numpy-devel >= 1:1.7.1 | |
42 | # or cairocffi | |
43 | BuildRequires: python3-pycairo | |
44 | BuildRequires: python3-pygobject3-devel >= 3.0 | |
45 | BuildRequires: python3-pyparsing >= 2.1.7 | |
46 | BuildRequires: python3-pytz | |
47 | BuildRequires: python3-six >= 1.10 | |
48 | BuildRequires: python3-setuptools | |
49 | # for import pyqtconfig needed by qt detection. | |
50 | BuildRequires: python3-sip-devel | |
51 | BuildRequires: python3-tkinter | |
52 | BuildRequires: python3-tornado | |
53 | #BuildRequires: python3-wxPython >= 2.9 | |
54 | %if %{with tests} | |
55 | BuildRequires: python3-kiwisolver >= 1.0.1 | |
56 | BuildRequires: python3-pytest >= 3.6 | |
57 | %endif | |
58 | BuildRequires: qhull-devel >= 2015.2 | |
59 | BuildRequires: rpm-pythonprov | |
60 | BuildRequires: rpmbuild(macros) >= 1.714 | |
61 | # /usr/bin/dvipng | |
62 | BuildRequires: texlive | |
63 | BuildRequires: tk-devel | |
64 | Requires: freetype >= 1:2.6.1 | |
65 | Requires: python3-modules >= 1:3.6 | |
66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
67 | ||
68 | %description | |
69 | matplotlib strives to produce publication quality 2D graphics using | |
70 | matlab plotting for inspiration. Although the main lib is object | |
71 | oriented, there is a functional interface "pylab" for people coming | |
72 | from Matlab. | |
73 | ||
74 | %description -l pl.UTF-8 | |
75 | matplotlib usiłuje tworzyć grafikę 2D o jakości publikacji przy użyciu | |
76 | wykresów matlaba jako inspiracji. Chociaż główna biblioteka jest | |
77 | zorientowana obiektowo, jest interfejs funkcyjny "pylab" dla ludzi | |
78 | przechodzących z Matlaba. | |
79 | ||
80 | %prep | |
81 | %setup -q -n %{module}-%{version} | |
82 | %patch0 -p1 | |
83 | ||
84 | unzip -q %{SOURCE1} -d lib/matplotlib/backends/web_backend | |
85 | ||
86 | %build | |
87 | export CFLAGS="%{rpmcflags}" | |
88 | ||
89 | %py3_build | |
90 | ||
91 | %if %{with tests} | |
92 | PYTHONPATH=$(readlink -f build-3/lib.*) \ | |
93 | %{__python3} tests.py --no-network | |
94 | %endif | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %py3_install | |
100 | ||
101 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/matplotlib/tests | |
102 | # matplotlib can use system fonts, so drop these copies | |
103 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/matplotlib/mpl-data/fonts/ttf/DejaVu*.ttf | |
104 | ||
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
110 | %doc README.rst LICENSE/LICENSE | |
111 | %dir %{py3_sitedir}/%{module} | |
112 | %{py3_sitedir}/%{module}/*.py | |
113 | %{py3_sitedir}/%{module}/__pycache__ | |
114 | %attr(755,root,root) %{py3_sitedir}/%{module}/*.so | |
115 | %{py3_sitedir}/%{module}/axes | |
116 | %dir %{py3_sitedir}/%{module}/backends | |
117 | %{py3_sitedir}/%{module}/backends/*.py | |
118 | %{py3_sitedir}/%{module}/backends/__pycache__ | |
119 | %attr(755,root,root) %{py3_sitedir}/%{module}/backends/*.so | |
120 | %dir %{py3_sitedir}/%{module}/backends/qt_editor | |
121 | %{py3_sitedir}/%{module}/backends/qt_editor/*.py | |
122 | %{py3_sitedir}/%{module}/backends/qt_editor/__pycache__ | |
123 | %{py3_sitedir}/%{module}/backends/web_backend | |
124 | %{py3_sitedir}/%{module}/cbook | |
125 | %{py3_sitedir}/%{module}/compat | |
126 | %{py3_sitedir}/%{module}/mpl-data | |
127 | %{py3_sitedir}/%{module}/projections | |
128 | %{py3_sitedir}/%{module}/sphinxext | |
129 | %{py3_sitedir}/%{module}/style | |
130 | %{py3_sitedir}/%{module}/testing | |
131 | %{py3_sitedir}/%{module}/tri | |
132 | %{py3_sitedir}/mpl_toolkits | |
133 | %{py3_sitedir}/pylab.py | |
134 | %{py3_sitedir}/__pycache__ | |
135 | %{py3_sitedir}/%{module}-%{version}-py*.egg-info | |
136 | %{py3_sitedir}/%{module}-%{version}-py*-nspkg.pth |