]> git.pld-linux.org Git - packages/python-matplotlib.git/blame - python-matplotlib.spec
rebuild with separate debuginfo build-ids
[packages/python-matplotlib.git] / python-matplotlib.spec
CommitLineData
d6259285 1# NOTE: for versions >= 3 (for python 3.6+) see python3-matplotlib.spec
e1486a8d 2# TODO: system jquery and jquery-ui (when they become up to date)
e82deedd 3#
44b7835f 4# Conditional build:
e82deedd 5%bcond_without python2 # CPython 2.x module
d6259285 6%bcond_with python3 # CPython 3.x module
e82deedd
JB
7%bcond_with tests # unit tests [many failures as of 1.5.3]
8
0daef324 9# TODO:
17a0057e 10# - use system fonts (mpl-data/fonts/ttf/{STIX,cm}*.ttf) and metrics (mpl-data/fonts/{afm,pdfcorefonts}/*.afm) in mpl-data dir?
44b7835f
JK
11# - make sure all dependencies that are available for Python3 are build for Python3
12# and included in BR when neccessary
0daef324 13%define module matplotlib
db475c22 14Summary: Matlab(TM) style Python plotting package
4ec85bdd 15Summary(pl.UTF-8): Pakiet do rysowania w Pythonie podobny do Matlaba(TM)
0daef324 16Name: python-%{module}
d6259285 17# keep 2.x here for python2 support
17a0057e 18Version: 2.2.5
41fae1cc 19Release: 3
e82deedd 20License: PSF
0daef324 21Group: Libraries/Python
e82deedd 22#Source0Download: https://github.com/matplotlib/matplotlib/releases
17a0057e
JB
23Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz
24# Source0-md5: 8c49e6086ec06f3b5e9a1b7ad1ac37ff
e1486a8d
JB
25Source1: https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip
26# Source1-md5: e0cfea21c9d1acd37fb58592f2c1f50d
17a0057e 27Patch0: %{name}-system-qhull.patch
e82deedd 28URL: https://matplotlib.org/
17a0057e
JB
29#BuildRequires: agg-devel
30BuildRequires: freetype-devel >= 1:2.6.1
e82deedd
JB
31BuildRequires: ghostscript
32BuildRequires: gtk+3 >= 3.0
33BuildRequires: libpng-devel >= 1.2
6466a51f 34BuildRequires: libstdc++-devel
db475c22 35BuildRequires: ncurses-devel
e82deedd
JB
36BuildRequires: pkgconfig
37# /usr/bin/pdftops
38BuildRequires: poppler-progs
17a0057e 39BuildRequires: qhull-devel >= 2015.2
e82deedd
JB
40BuildRequires: rpm-pythonprov
41BuildRequires: rpmbuild(macros) >= 1.714
42# /usr/bin/dvipng
43BuildRequires: texlive
44BuildRequires: tk-devel
44b7835f 45%if %{with python2}
e82deedd 46BuildRequires: gtk+2-devel >= 1:2.0
17a0057e 47BuildRequires: python >= 1:2.7
fed8a40c 48BuildRequires: python-PyQt4
e82deedd 49BuildRequires: python-PyQt5
17a0057e
JB
50BuildRequires: python-backports.functools_lru_cache
51BuildRequires: python-cycler >= 0.10
52BuildRequires: python-dateutil >= 2.1
53BuildRequires: python-devel >= 1:2.7
54BuildRequires: python-numpy-devel >= 1:1.7.1
e82deedd
JB
55# or cairocffi
56BuildRequires: python-pycairo
57BuildRequires: python-pygobject3-devel >= 3.0
58BuildRequires: python-pygtk-devel >= 1:2.2.0
17a0057e 59BuildRequires: python-pyparsing >= 2.1.7
6466a51f 60BuildRequires: python-pytz
e82deedd
JB
61BuildRequires: python-setuptools
62# for import pyqtconfig needed by qt detection.
ac8f4383 63BuildRequires: python-sip-devel
17a0057e
JB
64BuildRequires: python-six >= 1.10
65BuildRequires: python-subprocess32
ac8f4383 66BuildRequires: python-tkinter
e82deedd 67BuildRequires: python-tornado
17a0057e 68BuildRequires: python-wxPython >= 2.9
e82deedd 69%if %{with tests}
17a0057e 70BuildRequires: python-kiwisolver >= 1.0.1
e82deedd 71BuildRequires: python-mock
17a0057e 72BuildRequires: python-pytest >= 3.6
e82deedd 73%endif
44b7835f
JK
74%endif
75%if %{with python3}
17a0057e 76BuildRequires: python3 >= 1:3.4
44b7835f 77BuildRequires: python3-2to3
5a05aa50 78BuildRequires: python3-PyQt4
e82deedd 79BuildRequires: python3-PyQt5
17a0057e 80BuildRequires: python3-cycler >= 0.10
e82deedd 81BuildRequires: python3-dateutil >= 2.2
17a0057e
JB
82BuildRequires: python3-devel >= 1:3.4
83BuildRequires: python3-numpy-devel >= 1:1.7.1
e82deedd
JB
84# or cairocffi
85BuildRequires: python3-pycairo
86BuildRequires: python3-pygobject3-devel >= 3.0
17a0057e 87BuildRequires: python3-pyparsing >= 2.1.7
44b7835f 88BuildRequires: python3-pytz
17a0057e 89BuildRequires: python3-six >= 1.10
e82deedd
JB
90BuildRequires: python3-setuptools
91# for import pyqtconfig needed by qt detection.
92BuildRequires: python3-sip-devel
44b7835f 93BuildRequires: python3-tkinter
e82deedd 94BuildRequires: python3-tornado
17a0057e 95#BuildRequires: python3-wxPython >= 2.9
e82deedd 96%if %{with tests}
17a0057e
JB
97BuildRequires: python3-kiwisolver >= 1.0.1
98BuildRequires: python3-pytest >= 3.6
44b7835f 99%endif
e82deedd 100%endif
17a0057e
JB
101Requires: freetype >= 1:2.6.1
102Requires: python-modules >= 1:2.7
0daef324
AM
103BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
104
105%description
106matplotlib strives to produce publication quality 2D graphics using
107matlab plotting for inspiration. Although the main lib is object
108oriented, there is a functional interface "pylab" for people coming
109from Matlab.
110
617bcdd8
JR
111%description -l pl.UTF-8
112matplotlib usiłuje tworzyć grafikę 2D o jakości publikacji przy użyciu
113wykresów matlaba jako inspiracji. Chociaż główna biblioteka jest
db475c22 114zorientowana obiektowo, jest interfejs funkcyjny "pylab" dla ludzi
617bcdd8 115przechodzących z Matlaba.
db475c22 116
44b7835f
JK
117%package -n python3-%{module}
118Summary: Matlab(TM) style Python 3 plotting package
119Summary(pl.UTF-8): Pakiet do rysowania w Pythonie 3 podobny do Matlaba(TM)
120Group: Libraries/Python
17a0057e
JB
121Requires: freetype >= 1:2.6.1
122Requires: python3-modules >= 1:3.4
44b7835f
JK
123
124%description -n python3-%{module}
125matplotlib strives to produce publication quality 2D graphics using
126matlab plotting for inspiration. Although the main lib is object
127oriented, there is a functional interface "pylab" for people coming
128from Matlab.
129
130%description -n python3-%{module} -l pl.UTF-8
131matplotlib usiłuje tworzyć grafikę 2D o jakości publikacji przy użyciu
132wykresów matlaba jako inspiracji. Chociaż główna biblioteka jest
133zorientowana obiektowo, jest interfejs funkcyjny "pylab" dla ludzi
134przechodzących z Matlaba.
135
0daef324
AM
136%prep
137%setup -q -n %{module}-%{version}
17b19f40 138%patch0 -p1
07c41b0d 139
e1486a8d
JB
140unzip -q %{SOURCE1} -d lib/matplotlib/backends/web_backend
141
0daef324 142%build
ac8f4383 143export CFLAGS="%{rpmcflags}"
44b7835f
JK
144
145%if %{with python2}
3a472966 146%py_build
e82deedd
JB
147
148%if %{with tests}
149PYTHONPATH=$(readlink -f build-2/lib.*) \
150%{__python} tests.py --no-network
151%endif
44b7835f
JK
152%endif
153
154%if %{with python3}
3a472966 155%py3_build
e82deedd
JB
156
157%if %{with tests}
158PYTHONPATH=$(readlink -f build-2/lib.*) \
159%{__python3} tests.py --no-network
160%endif
44b7835f 161%endif
0daef324
AM
162
163%install
164rm -rf $RPM_BUILD_ROOT
165
44b7835f 166%if %{with python2}
3a472966 167%py_install
0daef324 168
ac8f4383 169%py_postclean
0daef324 170
3b1e1355 171# matplotlib can use system fonts, so drop these copies
17a0057e 172%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/matplotlib/mpl-data/fonts/ttf/DejaVu*.ttf
44b7835f
JK
173%endif
174
175%if %{with python3}
3a472966 176%py3_install
44b7835f 177
44b7835f 178# matplotlib can use system fonts, so drop these copies
17a0057e 179%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/matplotlib/mpl-data/fonts/ttf/DejaVu*.ttf
44b7835f
JK
180%endif
181
0daef324
AM
182%clean
183rm -rf $RPM_BUILD_ROOT
184
44b7835f 185%if %{with python2}
0daef324
AM
186%files
187%defattr(644,root,root,755)
17a0057e 188%doc README.rst LICENSE/LICENSE
b00c5f48
MWP
189%dir %{py_sitedir}/%{module}
190%{py_sitedir}/%{module}/*.py[co]
191%attr(755,root,root) %{py_sitedir}/%{module}/*.so
17a0057e 192%{py_sitedir}/%{module}/axes
b00c5f48
MWP
193%dir %{py_sitedir}/%{module}/backends
194%{py_sitedir}/%{module}/backends/*.py[co]
195%attr(755,root,root) %{py_sitedir}/%{module}/backends/*.so
1cef0da3
AM
196%dir %{py_sitedir}/%{module}/backends/qt_editor
197%{py_sitedir}/%{module}/backends/qt_editor/*.py[co]
1cef0da3 198%{py_sitedir}/%{module}/backends/web_backend
17a0057e 199%{py_sitedir}/%{module}/cbook
1cef0da3 200%{py_sitedir}/%{module}/compat
b00c5f48 201%{py_sitedir}/%{module}/mpl-data
fa8b7ea5 202%{py_sitedir}/%{module}/projections
60d13b2c 203%{py_sitedir}/%{module}/sphinxext
1cef0da3 204%{py_sitedir}/%{module}/style
1b7b491c
JR
205%{py_sitedir}/%{module}/testing
206%{py_sitedir}/%{module}/tri
fa8b7ea5
MK
207
208%{py_sitedir}/mpl_toolkits
6466a51f 209%{py_sitedir}/pylab.py[co]
17a0057e
JB
210%{py_sitedir}/%{module}-%{version}-py*.egg-info
211%{py_sitedir}/%{module}-%{version}-py*-nspkg.pth
44b7835f
JK
212%endif
213
214%if %{with python3}
215%files -n python3-%{module}
216%defattr(644,root,root,755)
17a0057e 217%doc README.rst LICENSE/LICENSE
44b7835f
JK
218%dir %{py3_sitedir}/%{module}
219%{py3_sitedir}/%{module}/*.py
220%{py3_sitedir}/%{module}/__pycache__
221%attr(755,root,root) %{py3_sitedir}/%{module}/*.so
17a0057e 222%{py3_sitedir}/%{module}/axes
44b7835f
JK
223%dir %{py3_sitedir}/%{module}/backends
224%{py3_sitedir}/%{module}/backends/*.py
225%{py3_sitedir}/%{module}/backends/__pycache__
226%attr(755,root,root) %{py3_sitedir}/%{module}/backends/*.so
1cef0da3
AM
227%dir %{py3_sitedir}/%{module}/backends/qt_editor
228%{py3_sitedir}/%{module}/backends/qt_editor/*.py
229%{py3_sitedir}/%{module}/backends/qt_editor/__pycache__
1cef0da3 230%{py3_sitedir}/%{module}/backends/web_backend
17a0057e 231%{py3_sitedir}/%{module}/cbook
1cef0da3 232%{py3_sitedir}/%{module}/compat
44b7835f
JK
233%{py3_sitedir}/%{module}/mpl-data
234%{py3_sitedir}/%{module}/projections
235%{py3_sitedir}/%{module}/sphinxext
1cef0da3 236%{py3_sitedir}/%{module}/style
44b7835f
JK
237%{py3_sitedir}/%{module}/testing
238%{py3_sitedir}/%{module}/tri
239%{py3_sitedir}/mpl_toolkits
240%{py3_sitedir}/pylab.py
241%{py3_sitedir}/__pycache__
17a0057e
JB
242%{py3_sitedir}/%{module}-%{version}-py*.egg-info
243%{py3_sitedir}/%{module}-%{version}-py*-nspkg.pth
44b7835f 244%endif
This page took 0.076277 seconds and 4 git commands to generate.