]> git.pld-linux.org Git - packages/python-ReportLab.git/blame - python-ReportLab.spec
Version 3.3.0
[packages/python-ReportLab.git] / python-ReportLab.spec
CommitLineData
4552da1a
ER
1#
2# Conditional build:
3000cab0 3%bcond_without doc # PDF documentation
4552da1a 4
52d263b7 5# TODO:
3000cab0 6# - python3 (3.3+) package
c2fda9eb
ER
7# - use system fonts:
8# /usr/lib/python2.7/site-packages/reportlab/fonts/VeraBI.ttf
9# - Check if docs/*.pdf is generated using _installed_ ReportLab
10# so build may fail if ReportLab is not installed on builder
4552da1a
ER
11# - Standard T1 font curves (source1) maybe should be packaged in other package?
12
d9259b5b 13%define module ReportLab
a4a2f83b 14Summary: Python library for generating PDFs and graphics
c949f2aa 15Summary(pl.UTF-8): Moduły Pythona do generowania PDF-ów oraz grafik
a4a2f83b 16Name: python-%{module}
8bc38ffb
MK
17Version: 3.3.0
18Release: 1
3000cab0 19License: BSD-like
ea319ad8 20Group: Libraries/Python
3000cab0 21#Source0Download: https://bitbucket.org/rptlab/reportlab/downloads
8bc38ffb
MK
22Source0: https://pypi.python.org/packages/b8/17/7c5342dfbc9dc856173309270006e34c3bfad59934f0faa1dcc117ac93f1/reportlab-%{version}.tar.gz
23# Source0-md5: 8ad6181b69ec515d4f6d8bb894682d5d
4552da1a 24Source1: http://www.reportlab.com/ftp/fonts/pfbfer.zip
bd514040 25# Source1-md5: 35d20e26490cb2a8646fab6276ac6a4c
738cd611 26Patch0: %{name}-setup.patch
aa5eb84b 27URL: http://www.reportlab.org/
3000cab0
JB
28BuildRequires: freetype-devel >= 2
29BuildRequires: libart_lgpl-devel >= 2
2395c0c9 30%{?with_doc:BuildRequires: python-PIL}
3000cab0 31BuildRequires: python-devel >= 1:2.7
0a65d05a 32BuildRequires: rpm-pythonprov
97718011 33BuildRequires: rpmbuild(macros) >= 1.710
0eb43df7 34BuildRequires: unzip
3000cab0 35Requires: python >= 1:2.7
f5cd4c86 36Requires: python-PIL
323ddece 37Obsoletes: ReportLab
aa5eb84b
PZ
38Obsoletes: python-ReportLab-barcode
39Obsoletes: python-ReportLab-renderPM
40Obsoletes: python-ReportLab-rl_accel
a4a2f83b
AM
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
9af85c5a 44A library written in Python that lets you generate platform
a4a2f83b 45independant PDFs and graphics.
9af85c5a 46- PDF generation: uses Python, a clean OO language, layered
a4a2f83b
AM
47 architecture
48- Graphics: provides primitive shapes, reusable widgets, sample
49 collections including business chart and diagrams
9af85c5a 50- PythonPoint: a utility for generating PDF slides from a simple XML
a4a2f83b
AM
51 format
52
3c27fae7
JR
53%description -l pl.UTF-8
54Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych
55od platformy PDF-ów oraz grafik.
56- Generowanie PDF: używa Pythona, przejrzystego języka obiektowego o
d9259b5b 57 warstwowej architekturze
3c27fae7 58- Grafika: podstawowe figury geometryczne, kontrolki, a także
4eeb0886
JB
59 przykłady, w tym wykresy i diagramy
60- PythonPoint: narzędzie do generowania slajdów w formacie PDF z
d9259b5b 61 prostego formatu XML
a4a2f83b 62
97eb83fc 63%package examples
2ddb11c0 64Summary: Examples for ReportLab
c949f2aa 65Summary(pl.UTF-8): Przykłady do biblioteki ReportLab
97eb83fc 66Group: Libraries/Python
2ddb11c0 67Requires: %{name} = %{version}-%{release}
97eb83fc
JK
68
69%description examples
2ddb11c0 70Examples for ReportLab.
97eb83fc 71
3c27fae7
JR
72%description examples -l pl.UTF-8
73Przykłady do biblioteki ReportLab.
97eb83fc 74
a4a2f83b 75%prep
8bc38ffb
MK
76# %setup -q -n rptlab-reportlab-6382a792db9e
77%setup -q -n reportlab-%{version}
78
a4a2f83b 79
4552da1a 80%{__unzip} -qq -d src/reportlab/fonts %{SOURCE1}
8bc38ffb
MK
81# Remove install_requires=['pillow>=2.4.0','pip>=1.4.1', 'setuptools>=2.2'],
82# which leads to bugus install requirements
83sed -i.bak '/install_requires/d' setup.py
4552da1a 84
a4a2f83b 85%build
c141c05b 86%py_build
2395c0c9 87%if %{with doc}
aa5eb84b 88cd docs
4552da1a 89PYTHONPATH=$(pwd)/../src %{__python} genAll.py
aa5eb84b 90cd ..
2395c0c9 91%endif
a4a2f83b
AM
92
93%install
94rm -rf $RPM_BUILD_ROOT
c141c05b 95%py_install
a4a2f83b 96
2ddb11c0 97install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}}
4552da1a 98install -p tools/pythonpoint/pythonpoint.py $RPM_BUILD_ROOT%{_bindir}
a4a2f83b 99
c5ba6e37
SS
100install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab
101
2ddb11c0 102cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
2ddb11c0 103cp -a tools/pythonpoint/demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
97eb83fc 104
3000cab0 105%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples
810e62a7 106
0a65d05a 107%py_postclean
a4a2f83b 108
a4a2f83b
AM
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%files
113%defattr(644,root,root,755)
8bc38ffb 114%doc CHANGES.md LICENSE.txt README.txt %{?with_doc:docs/reportlab-userguide.pdf}
4552da1a 115%attr(755,root,root) %{_bindir}/pythonpoint.py
c2fda9eb 116%dir %{py_sitescriptdir}/reportlab
aa5eb84b
PZ
117%dir %{py_sitedir}/reportlab
118%{py_sitedir}/reportlab-%{version}-py*.egg-info
119%{py_sitedir}/reportlab/*.py[co]
120%dir %{py_sitedir}/reportlab/fonts
3000cab0
JB
121%{py_sitedir}/reportlab/fonts/00readme.txt
122# Dark Garden font (GPL v2+)
123%{py_sitedir}/reportlab/fonts/DarkGardenMK.afm
124%{py_sitedir}/reportlab/fonts/DarkGardenMK.pfb
125%{py_sitedir}/reportlab/fonts/DarkGarden.sfd
126%{py_sitedir}/reportlab/fonts/DarkGarden-*.txt
127# Bitstream Vera font
128%{py_sitedir}/reportlab/fonts/Vera*.ttf
129%{py_sitedir}/reportlab/fonts/bitstream-vera-license.txt
130# Adobe fonts
131%{py_sitedir}/reportlab/fonts/_a*____.pfb
132%{py_sitedir}/reportlab/fonts/_e*____.pfb
133%{py_sitedir}/reportlab/fonts/co*____.pfb
134%{py_sitedir}/reportlab/fonts/sy______.pfb
135%{py_sitedir}/reportlab/fonts/z?______.pfb
aa5eb84b 136%dir %{py_sitedir}/reportlab/graphics
3000cab0 137%attr(755,root,root) %{py_sitedir}/reportlab/graphics/_renderPM.so
aa5eb84b 138%{py_sitedir}/reportlab/graphics/*.py[co]
aa5eb84b
PZ
139%dir %{py_sitedir}/reportlab/graphics/barcode
140%{py_sitedir}/reportlab/graphics/barcode/*.py[co]
3000cab0
JB
141%dir %{py_sitedir}/reportlab/graphics/charts
142%{py_sitedir}/reportlab/graphics/charts/*.py[co]
aa5eb84b
PZ
143%dir %{py_sitedir}/reportlab/graphics/widgets
144%{py_sitedir}/reportlab/graphics/widgets/*.py[co]
145%dir %{py_sitedir}/reportlab/lib
3000cab0
JB
146%attr(755,root,root) %{py_sitedir}/reportlab/lib/_rl_accel.so
147%attr(755,root,root) %{py_sitedir}/reportlab/lib/pyHnj.so
aa5eb84b 148%{py_sitedir}/reportlab/lib/*.py[co]
3000cab0 149%{py_sitedir}/reportlab/lib/hyphen.mashed
aa5eb84b
PZ
150%dir %{py_sitedir}/reportlab/pdfbase
151%{py_sitedir}/reportlab/pdfbase/*.py[co]
152%dir %{py_sitedir}/reportlab/pdfgen
153%{py_sitedir}/reportlab/pdfgen/*.py[co]
154%dir %{py_sitedir}/reportlab/platypus
155%{py_sitedir}/reportlab/platypus/*.py[co]
97eb83fc
JK
156
157%files examples
158%defattr(644,root,root,755)
2ddb11c0 159%dir %{_examplesdir}/%{name}-%{version}
2ddb11c0
JB
160%{_examplesdir}/%{name}-%{version}/demos
161%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
This page took 0.128148 seconds and 4 git commands to generate.