]> git.pld-linux.org Git - packages/python-ReportLab.git/blob - python-ReportLab.spec
f4f868b47d0d550b4ebdd7f04c26c7bf56e5b208
[packages/python-ReportLab.git] / python-ReportLab.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # PDF documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 # TODO:
8 # - use system fonts (see files lists) or share fonts for both python versions
9 # - tools/docco and tools/pythonpoint as subpackages?
10
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}
15 Version:        3.5.68
16 Release:        1
17 License:        BSD-like
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
26 %if %{with python2}
27 BuildRequires:  python-devel >= 1:2.7
28 BuildRequires:  python-setuptools
29 %endif
30 %{?with_doc:BuildRequires:      python-pillow >= 4.0.0}
31 %if %{with python3}
32 BuildRequires:  python3-devel >= 1:3.6
33 BuildRequires:  python3-setuptools
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 BuildRequires:  unzip
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)
43
44 %description
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
48   architecture
49 - Graphics: provides primitive shapes, reusable widgets, sample
50   collections including business chart and diagrams
51
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
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
64 Requires:       python3-modules >= 1:3.6
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
86 BuildArch:      noarch
87
88 %description apidocs
89 API documentation for ReportLab module.
90
91 %description apidocs -l pl.UTF-8
92 Dokumentacja API modułu ReportLab.
93
94 %package examples
95 Summary:        Examples for ReportLab
96 Summary(pl.UTF-8):      Przykłady do biblioteki ReportLab
97 Group:          Libraries/Python
98 Requires:       %{name} = %{version}-%{release}
99 BuildArch:      noarch
100
101 %description examples
102 Examples for ReportLab.
103
104 %description examples -l pl.UTF-8
105 Przykłady do biblioteki ReportLab.
106
107 %prep
108 %setup -q -n reportlab-%{version}
109
110 %build
111 %if %{with python2}
112 %py_build
113 %endif
114
115 %if %{with python3}
116 %py3_build
117 %endif
118
119 %if %{with doc}
120 cd docs
121 PYTHONPATH=$(echo $(pwd)/../build-2/lib.*) \
122 %{__python} genAll.py
123 cd ..
124 %endif
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128
129 %if %{with python2}
130 %py_install
131
132 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab
133
134 %py_postclean
135 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples
136 %endif
137
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
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %if %{with python2}
157 %files
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
174 # ?
175 %{py_sitedir}/reportlab/fonts/callig15.afm
176 %{py_sitedir}/reportlab/fonts/callig15.pfb
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
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]
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__
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
266
267 %files examples
268 %defattr(644,root,root,755)
269 %dir %{_examplesdir}/%{name}-%{version}
270 %{_examplesdir}/%{name}-%{version}/demos
This page took 0.114636 seconds and 2 git commands to generate.