3 %bcond_without doc # PDF documentation
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 # - use system fonts (see files lists) or share fonts for both python versions
9 # - tools/docco and tools/pythonpoint as subpackages?
11 %define module ReportLab
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
14 Name: python-%{module}
18 Group: Libraries/Python
19 #Source0Download: https://bitbucket.org/rptlab/reportlab/downloads/?tab=tags
20 Source0: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz
21 # Source0-md5: 92f79d609974ae8d6c57d0e3187db297
22 Patch0: %{name}-setup.patch
23 URL: https://www.reportlab.com/dev/opensource/
24 BuildRequires: freetype-devel >= 2
25 BuildRequires: libart_lgpl-devel >= 2
27 BuildRequires: python-devel >= 1:2.7
28 BuildRequires: python-setuptools
30 %{?with_doc:BuildRequires: python-pillow >= 4.0.0}
32 BuildRequires: python3-devel >= 1:3.6
33 BuildRequires: python3-setuptools
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.714
38 Requires: python-modules >= 1:2.7
39 Obsoletes: python-ReportLab-barcode < 1
40 Obsoletes: python-ReportLab-renderPM < 2
41 Obsoletes: python-ReportLab-rl_accel < 1
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 A library written in Python that lets you generate platform
46 independant PDFs and graphics.
47 - PDF generation: uses Python, a clean OO language, layered
49 - Graphics: provides primitive shapes, reusable widgets, sample
50 collections including business chart and diagrams
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
56 warstwowej architekturze
57 - Grafika: podstawowe figury geometryczne, kontrolki, a także
58 przykłady, w tym wykresy i diagramy
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
64 Requires: python3-modules >= 1:3.6
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
71 - Graphics: provides primitive shapes, reusable widgets, sample
72 collections including business chart and diagrams
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
83 Summary: API documentation for ReportLab module
84 Summary(pl.UTF_8): Dokumentacja API modułu ReportLab
89 API documentation for ReportLab module.
91 %description apidocs -l pl.UTF-8
92 Dokumentacja API modułu ReportLab.
95 Summary: Examples for ReportLab
96 Summary(pl.UTF-8): Przykłady do biblioteki ReportLab
97 Group: Libraries/Python
98 Requires: %{name} = %{version}-%{release}
101 %description examples
102 Examples for ReportLab.
104 %description examples -l pl.UTF-8
105 Przykłady do biblioteki ReportLab.
108 %setup -q -n reportlab-%{version}
121 PYTHONPATH=$(echo $(pwd)/../build-2/lib.*) \
122 %{__python} genAll.py
127 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab
135 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples
141 install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/reportlab
143 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/reportlab/graphics/samples
146 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
147 cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
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
154 rm -rf $RPM_BUILD_ROOT
158 %defattr(644,root,root,755)
159 %doc CHANGES.md LICENSE.txt README.txt
160 %dir %{py_sitescriptdir}/reportlab
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
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
175 %{py_sitedir}/reportlab/fonts/callig15.afm
176 %{py_sitedir}/reportlab/fonts/callig15.pfb
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
183 %dir %{py_sitedir}/reportlab/graphics
184 %attr(755,root,root) %{py_sitedir}/reportlab/graphics/_renderPM.so
185 %{py_sitedir}/reportlab/graphics/*.py[co]
186 %dir %{py_sitedir}/reportlab/graphics/barcode
187 %{py_sitedir}/reportlab/graphics/barcode/*.py[co]
188 %dir %{py_sitedir}/reportlab/graphics/charts
189 %{py_sitedir}/reportlab/graphics/charts/*.py[co]
190 %dir %{py_sitedir}/reportlab/graphics/widgets
191 %{py_sitedir}/reportlab/graphics/widgets/*.py[co]
192 %dir %{py_sitedir}/reportlab/lib
193 %attr(755,root,root) %{py_sitedir}/reportlab/lib/_rl_accel.so
194 %attr(755,root,root) %{py_sitedir}/reportlab/lib/pyHnj.so
195 %{py_sitedir}/reportlab/lib/*.py[co]
196 %{py_sitedir}/reportlab/lib/hyphen.mashed
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]
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
225 %{py3_sitedir}/reportlab/fonts/callig15.afm
226 %{py3_sitedir}/reportlab/fonts/callig15.pfb
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__
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__
263 %defattr(644,root,root,755)
264 %doc docs/reportlab-userguide.pdf
268 %defattr(644,root,root,755)
269 %dir %{_examplesdir}/%{name}-%{version}
270 %{_examplesdir}/%{name}-%{version}/demos