]>
Commit | Line | Data |
---|---|---|
4552da1a ER |
1 | # |
2 | # Conditional build: | |
3000cab0 | 3 | %bcond_without doc # PDF documentation |
f1821ff5 JB |
4 | %bcond_without python2 # CPython 2.x module |
5 | %bcond_without python3 # CPython 3.x module | |
4552da1a | 6 | |
52d263b7 | 7 | # TODO: |
f1821ff5 JB |
8 | # - use system fonts (see files lists) or share fonts for both python versions |
9 | # - tools/docco and tools/pythonpoint as subpackages? | |
4552da1a | 10 | |
d9259b5b | 11 | %define module ReportLab |
f1821ff5 JB |
12 | Summary: Python 2 library for generating PDFs and graphics |
13 | Summary(pl.UTF-8): Moduły Pythona 2 do generowania PDF-ów oraz grafik | |
a4a2f83b | 14 | Name: python-%{module} |
10f52c48 | 15 | Version: 3.5.68 |
f47c38d2 | 16 | Release: 2 |
3000cab0 | 17 | License: BSD-like |
ea319ad8 | 18 | Group: Libraries/Python |
f1821ff5 JB |
19 | #Source0Download: https://bitbucket.org/rptlab/reportlab/downloads/?tab=tags |
20 | Source0: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz | |
10f52c48 | 21 | # Source0-md5: 92f79d609974ae8d6c57d0e3187db297 |
738cd611 | 22 | Patch0: %{name}-setup.patch |
f1821ff5 | 23 | URL: https://www.reportlab.com/dev/opensource/ |
3000cab0 JB |
24 | BuildRequires: freetype-devel >= 2 |
25 | BuildRequires: libart_lgpl-devel >= 2 | |
f1821ff5 | 26 | %if %{with python2} |
3000cab0 | 27 | BuildRequires: python-devel >= 1:2.7 |
f1821ff5 JB |
28 | BuildRequires: python-setuptools |
29 | %endif | |
30 | %{?with_doc:BuildRequires: python-pillow >= 4.0.0} | |
31 | %if %{with python3} | |
10f52c48 | 32 | BuildRequires: python3-devel >= 1:3.6 |
f1821ff5 JB |
33 | BuildRequires: python3-setuptools |
34 | %endif | |
0a65d05a | 35 | BuildRequires: rpm-pythonprov |
f1821ff5 | 36 | BuildRequires: rpmbuild(macros) >= 1.714 |
0eb43df7 | 37 | BuildRequires: unzip |
f1821ff5 | 38 | Requires: python-modules >= 1:2.7 |
10f52c48 JB |
39 | Obsoletes: python-ReportLab-barcode < 1 |
40 | Obsoletes: python-ReportLab-renderPM < 2 | |
41 | Obsoletes: python-ReportLab-rl_accel < 1 | |
a4a2f83b AM |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
9af85c5a | 45 | A library written in Python that lets you generate platform |
a4a2f83b | 46 | independant PDFs and graphics. |
9af85c5a | 47 | - PDF generation: uses Python, a clean OO language, layered |
a4a2f83b AM |
48 | architecture |
49 | - Graphics: provides primitive shapes, reusable widgets, sample | |
50 | collections including business chart and diagrams | |
a4a2f83b | 51 | |
3c27fae7 JR |
52 | %description -l pl.UTF-8 |
53 | Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych | |
54 | od platformy PDF-ów oraz grafik. | |
55 | - Generowanie PDF: używa Pythona, przejrzystego języka obiektowego o | |
d9259b5b | 56 | warstwowej architekturze |
3c27fae7 | 57 | - Grafika: podstawowe figury geometryczne, kontrolki, a także |
4eeb0886 | 58 | przykłady, w tym wykresy i diagramy |
f1821ff5 JB |
59 | |
60 | %package -n python3-%{module} | |
61 | Summary: Python 3 library for generating PDFs and graphics | |
62 | Summary(pl.UTF-8): Moduły Pythona 3 do generowania PDF-ów oraz grafik | |
63 | Group: Libraries/Python | |
10f52c48 | 64 | Requires: python3-modules >= 1:3.6 |
f1821ff5 JB |
65 | |
66 | %description -n python3-%{module} | |
67 | A library written in Python that lets you generate platform | |
68 | independant PDFs and graphics. | |
69 | - PDF generation: uses Python, a clean OO language, layered | |
70 | architecture | |
71 | - Graphics: provides primitive shapes, reusable widgets, sample | |
72 | collections including business chart and diagrams | |
73 | ||
74 | %description -n python3-%{module} -l pl.UTF-8 | |
75 | Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych | |
76 | od platformy PDF-ów oraz grafik. | |
77 | - Generowanie PDF: używa Pythona, przejrzystego języka obiektowego o | |
78 | warstwowej architekturze | |
79 | - Grafika: podstawowe figury geometryczne, kontrolki, a także | |
80 | przykłady, w tym wykresy i diagramy | |
81 | ||
82 | %package apidocs | |
83 | Summary: API documentation for ReportLab module | |
84 | Summary(pl.UTF_8): Dokumentacja API modułu ReportLab | |
85 | Group: Documentation | |
f1821ff5 | 86 | BuildArch: noarch |
f1821ff5 JB |
87 | |
88 | %description apidocs | |
89 | API documentation for ReportLab module. | |
90 | ||
91 | %description apidocs -l pl.UTF-8 | |
92 | Dokumentacja API modułu ReportLab. | |
a4a2f83b | 93 | |
97eb83fc | 94 | %package examples |
2ddb11c0 | 95 | Summary: Examples for ReportLab |
c949f2aa | 96 | Summary(pl.UTF-8): Przykłady do biblioteki ReportLab |
97eb83fc | 97 | Group: Libraries/Python |
2ddb11c0 | 98 | Requires: %{name} = %{version}-%{release} |
f1821ff5 | 99 | BuildArch: noarch |
97eb83fc JK |
100 | |
101 | %description examples | |
2ddb11c0 | 102 | Examples for ReportLab. |
97eb83fc | 103 | |
3c27fae7 JR |
104 | %description examples -l pl.UTF-8 |
105 | Przykłady do biblioteki ReportLab. | |
97eb83fc | 106 | |
a4a2f83b | 107 | %prep |
8bc38ffb MK |
108 | %setup -q -n reportlab-%{version} |
109 | ||
a4a2f83b | 110 | %build |
f1821ff5 | 111 | %if %{with python2} |
c141c05b | 112 | %py_build |
f1821ff5 JB |
113 | %endif |
114 | ||
115 | %if %{with python3} | |
116 | %py3_build | |
117 | %endif | |
118 | ||
2395c0c9 | 119 | %if %{with doc} |
aa5eb84b | 120 | cd docs |
10f52c48 JB |
121 | PYTHONPATH=$(echo $(pwd)/../build-2/lib.*) \ |
122 | %{__python} genAll.py | |
aa5eb84b | 123 | cd .. |
2395c0c9 | 124 | %endif |
a4a2f83b AM |
125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
a4a2f83b | 128 | |
f1821ff5 JB |
129 | %if %{with python2} |
130 | %py_install | |
a4a2f83b | 131 | |
c5ba6e37 SS |
132 | install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab |
133 | ||
f1821ff5 | 134 | %py_postclean |
3000cab0 | 135 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples |
f1821ff5 | 136 | %endif |
810e62a7 | 137 | |
f1821ff5 JB |
138 | %if %{with python3} |
139 | %py3_install | |
140 | ||
141 | install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/reportlab | |
142 | ||
143 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/reportlab/graphics/samples | |
144 | %endif | |
145 | ||
146 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
147 | cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
148 | ||
149 | # TODO: (whole) pythonpoint as subpackage? | |
150 | #install -p tools/pythonpoint/pythonpoint.py $RPM_BUILD_ROOT%{_bindir} | |
151 | #cp -a tools/pythonpoint/demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/pythonpoint-demos | |
a4a2f83b | 152 | |
a4a2f83b AM |
153 | %clean |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
f1821ff5 | 156 | %if %{with python2} |
a4a2f83b AM |
157 | %files |
158 | %defattr(644,root,root,755) | |
f1821ff5 | 159 | %doc CHANGES.md LICENSE.txt README.txt |
c2fda9eb | 160 | %dir %{py_sitescriptdir}/reportlab |
aa5eb84b PZ |
161 | %dir %{py_sitedir}/reportlab |
162 | %{py_sitedir}/reportlab-%{version}-py*.egg-info | |
163 | %{py_sitedir}/reportlab/*.py[co] | |
164 | %dir %{py_sitedir}/reportlab/fonts | |
3000cab0 JB |
165 | %{py_sitedir}/reportlab/fonts/00readme.txt |
166 | # Dark Garden font (GPL v2+) | |
167 | %{py_sitedir}/reportlab/fonts/DarkGardenMK.afm | |
168 | %{py_sitedir}/reportlab/fonts/DarkGardenMK.pfb | |
169 | %{py_sitedir}/reportlab/fonts/DarkGarden.sfd | |
170 | %{py_sitedir}/reportlab/fonts/DarkGarden-*.txt | |
171 | # Bitstream Vera font | |
172 | %{py_sitedir}/reportlab/fonts/Vera*.ttf | |
173 | %{py_sitedir}/reportlab/fonts/bitstream-vera-license.txt | |
f1821ff5 JB |
174 | # ? |
175 | %{py_sitedir}/reportlab/fonts/callig15.afm | |
176 | %{py_sitedir}/reportlab/fonts/callig15.pfb | |
3000cab0 JB |
177 | # Adobe fonts |
178 | %{py_sitedir}/reportlab/fonts/_a*____.pfb | |
179 | %{py_sitedir}/reportlab/fonts/_e*____.pfb | |
180 | %{py_sitedir}/reportlab/fonts/co*____.pfb | |
181 | %{py_sitedir}/reportlab/fonts/sy______.pfb | |
182 | %{py_sitedir}/reportlab/fonts/z?______.pfb | |
aa5eb84b | 183 | %dir %{py_sitedir}/reportlab/graphics |
3000cab0 | 184 | %attr(755,root,root) %{py_sitedir}/reportlab/graphics/_renderPM.so |
aa5eb84b | 185 | %{py_sitedir}/reportlab/graphics/*.py[co] |
aa5eb84b PZ |
186 | %dir %{py_sitedir}/reportlab/graphics/barcode |
187 | %{py_sitedir}/reportlab/graphics/barcode/*.py[co] | |
3000cab0 JB |
188 | %dir %{py_sitedir}/reportlab/graphics/charts |
189 | %{py_sitedir}/reportlab/graphics/charts/*.py[co] | |
aa5eb84b PZ |
190 | %dir %{py_sitedir}/reportlab/graphics/widgets |
191 | %{py_sitedir}/reportlab/graphics/widgets/*.py[co] | |
192 | %dir %{py_sitedir}/reportlab/lib | |
3000cab0 JB |
193 | %attr(755,root,root) %{py_sitedir}/reportlab/lib/_rl_accel.so |
194 | %attr(755,root,root) %{py_sitedir}/reportlab/lib/pyHnj.so | |
aa5eb84b | 195 | %{py_sitedir}/reportlab/lib/*.py[co] |
3000cab0 | 196 | %{py_sitedir}/reportlab/lib/hyphen.mashed |
aa5eb84b PZ |
197 | %dir %{py_sitedir}/reportlab/pdfbase |
198 | %{py_sitedir}/reportlab/pdfbase/*.py[co] | |
199 | %dir %{py_sitedir}/reportlab/pdfgen | |
200 | %{py_sitedir}/reportlab/pdfgen/*.py[co] | |
201 | %dir %{py_sitedir}/reportlab/platypus | |
202 | %{py_sitedir}/reportlab/platypus/*.py[co] | |
f1821ff5 JB |
203 | %endif |
204 | ||
205 | %if %{with python3} | |
206 | %files -n python3-%{module} | |
207 | %defattr(644,root,root,755) | |
208 | %doc CHANGES.md LICENSE.txt README.txt | |
209 | %dir %{py3_sitescriptdir}/reportlab | |
210 | %dir %{py3_sitedir}/reportlab | |
211 | %{py3_sitedir}/reportlab-%{version}-py*.egg-info | |
212 | %{py3_sitedir}/reportlab/*.py | |
213 | %{py3_sitedir}/reportlab/__pycache__ | |
214 | %dir %{py3_sitedir}/reportlab/fonts | |
215 | %{py3_sitedir}/reportlab/fonts/00readme.txt | |
216 | # Dark Garden font (GPL v2+) | |
217 | %{py3_sitedir}/reportlab/fonts/DarkGardenMK.afm | |
218 | %{py3_sitedir}/reportlab/fonts/DarkGardenMK.pfb | |
219 | %{py3_sitedir}/reportlab/fonts/DarkGarden.sfd | |
220 | %{py3_sitedir}/reportlab/fonts/DarkGarden-*.txt | |
221 | # Bitstream Vera font | |
222 | %{py3_sitedir}/reportlab/fonts/Vera*.ttf | |
223 | %{py3_sitedir}/reportlab/fonts/bitstream-vera-license.txt | |
224 | # ? | |
225 | %{py3_sitedir}/reportlab/fonts/callig15.afm | |
226 | %{py3_sitedir}/reportlab/fonts/callig15.pfb | |
227 | # Adobe fonts | |
228 | %{py3_sitedir}/reportlab/fonts/_a*____.pfb | |
229 | %{py3_sitedir}/reportlab/fonts/_e*____.pfb | |
230 | %{py3_sitedir}/reportlab/fonts/co*____.pfb | |
231 | %{py3_sitedir}/reportlab/fonts/sy______.pfb | |
232 | %{py3_sitedir}/reportlab/fonts/z?______.pfb | |
233 | %dir %{py3_sitedir}/reportlab/graphics | |
234 | %attr(755,root,root) %{py3_sitedir}/reportlab/graphics/_renderPM.cpython-*.so | |
235 | %{py3_sitedir}/reportlab/graphics/*.py | |
236 | %{py3_sitedir}/reportlab/graphics/__pycache__ | |
237 | %dir %{py3_sitedir}/reportlab/graphics/barcode | |
238 | %{py3_sitedir}/reportlab/graphics/barcode/*.py | |
239 | %{py3_sitedir}/reportlab/graphics/barcode/__pycache__ | |
240 | %dir %{py3_sitedir}/reportlab/graphics/charts | |
241 | %{py3_sitedir}/reportlab/graphics/charts/*.py | |
242 | %{py3_sitedir}/reportlab/graphics/charts/__pycache__ | |
243 | %dir %{py3_sitedir}/reportlab/graphics/widgets | |
244 | %{py3_sitedir}/reportlab/graphics/widgets/*.py | |
245 | %{py3_sitedir}/reportlab/graphics/widgets/__pycache__ | |
246 | %dir %{py3_sitedir}/reportlab/lib | |
247 | %attr(755,root,root) %{py3_sitedir}/reportlab/lib/_rl_accel.cpython-*.so | |
248 | %{py3_sitedir}/reportlab/lib/*.py | |
249 | %{py3_sitedir}/reportlab/lib/__pycache__ | |
f1821ff5 JB |
250 | %dir %{py3_sitedir}/reportlab/pdfbase |
251 | %{py3_sitedir}/reportlab/pdfbase/*.py | |
252 | %{py3_sitedir}/reportlab/pdfbase/__pycache__ | |
253 | %dir %{py3_sitedir}/reportlab/pdfgen | |
254 | %{py3_sitedir}/reportlab/pdfgen/*.py | |
255 | %{py3_sitedir}/reportlab/pdfgen/__pycache__ | |
256 | %dir %{py3_sitedir}/reportlab/platypus | |
257 | %{py3_sitedir}/reportlab/platypus/*.py | |
258 | %{py3_sitedir}/reportlab/platypus/__pycache__ | |
259 | %endif | |
260 | ||
261 | %if %{with doc} | |
262 | %files apidocs | |
263 | %defattr(644,root,root,755) | |
264 | %doc docs/reportlab-userguide.pdf | |
265 | %endif | |
97eb83fc JK |
266 | |
267 | %files examples | |
268 | %defattr(644,root,root,755) | |
2ddb11c0 | 269 | %dir %{_examplesdir}/%{name}-%{version} |
2ddb11c0 | 270 | %{_examplesdir}/%{name}-%{version}/demos |