]> git.pld-linux.org Git - packages/python-ReportLab.git/blob - python-ReportLab.spec
1bbd51ce04851e721a06f6813be6c2d850153b65
[packages/python-ReportLab.git] / python-ReportLab.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # PDF documentation
4
5 # TODO:
6 # - python3 (3.3+) package
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
11 # - Standard T1 font curves (source1) maybe should be packaged in other package?
12
13 %define         module  ReportLab
14 Summary:        Python library for generating PDFs and graphics
15 Summary(pl.UTF-8):      Moduły Pythona do generowania PDF-ów oraz grafik
16 Name:           python-%{module}
17 Version:        3.3.0
18 Release:        1
19 License:        BSD-like
20 Group:          Libraries/Python
21 #Source0Download: https://bitbucket.org/rptlab/reportlab/downloads
22 Source0:        https://pypi.python.org/packages/b8/17/7c5342dfbc9dc856173309270006e34c3bfad59934f0faa1dcc117ac93f1/reportlab-%{version}.tar.gz
23 # Source0-md5:  8ad6181b69ec515d4f6d8bb894682d5d
24 Source1:        http://www.reportlab.com/ftp/fonts/pfbfer.zip
25 # Source1-md5:  35d20e26490cb2a8646fab6276ac6a4c
26 Patch0:         %{name}-setup.patch
27 URL:            http://www.reportlab.org/
28 BuildRequires:  freetype-devel >= 2
29 BuildRequires:  libart_lgpl-devel >= 2
30 %{?with_doc:BuildRequires:      python-PIL}
31 BuildRequires:  python-devel >= 1:2.7
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.710
34 BuildRequires:  unzip
35 Requires:       python >= 1:2.7
36 Requires:       python-PIL
37 Obsoletes:      ReportLab
38 Obsoletes:      python-ReportLab-barcode
39 Obsoletes:      python-ReportLab-renderPM
40 Obsoletes:      python-ReportLab-rl_accel
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 A library written in Python that lets you generate platform
45 independant PDFs and graphics.
46 - PDF generation: uses Python, a clean OO language, layered
47   architecture
48 - Graphics: provides primitive shapes, reusable widgets, sample
49   collections including business chart and diagrams
50 - PythonPoint: a utility for generating PDF slides from a simple XML
51   format
52
53 %description -l pl.UTF-8
54 Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych
55 od platformy PDF-ów oraz grafik.
56 - Generowanie PDF: używa Pythona, przejrzystego języka obiektowego o
57   warstwowej architekturze
58 - Grafika: podstawowe figury geometryczne, kontrolki, a także
59   przykłady, w tym wykresy i diagramy
60 - PythonPoint: narzędzie do generowania slajdów w formacie PDF z
61   prostego formatu XML
62
63 %package examples
64 Summary:        Examples for ReportLab
65 Summary(pl.UTF-8):      Przykłady do biblioteki ReportLab
66 Group:          Libraries/Python
67 Requires:       %{name} = %{version}-%{release}
68
69 %description examples
70 Examples for ReportLab.
71
72 %description examples -l pl.UTF-8
73 Przykłady do biblioteki ReportLab.
74
75 %prep
76 # %setup -q -n rptlab-reportlab-6382a792db9e
77 %setup -q -n reportlab-%{version}
78
79
80 %{__unzip} -qq -d src/reportlab/fonts %{SOURCE1}
81 # Remove install_requires=['pillow>=2.4.0','pip>=1.4.1', 'setuptools>=2.2'],
82 # which leads to bugus install requirements
83 sed  -i.bak '/install_requires/d' setup.py
84
85 %build
86 %py_build
87 %if %{with doc}
88 cd docs
89 PYTHONPATH=$(pwd)/../src %{__python} genAll.py
90 cd ..
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 %py_install
96
97 install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}}
98 install -p tools/pythonpoint/pythonpoint.py $RPM_BUILD_ROOT%{_bindir}
99
100 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab
101
102 cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
103 cp -a tools/pythonpoint/demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
104
105 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples
106
107 %py_postclean
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %files
113 %defattr(644,root,root,755)
114 %doc CHANGES.md LICENSE.txt README.txt %{?with_doc:docs/reportlab-userguide.pdf}
115 %attr(755,root,root) %{_bindir}/pythonpoint.py
116 %dir %{py_sitescriptdir}/reportlab
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
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
136 %dir %{py_sitedir}/reportlab/graphics
137 %attr(755,root,root) %{py_sitedir}/reportlab/graphics/_renderPM.so
138 %{py_sitedir}/reportlab/graphics/*.py[co]
139 %dir %{py_sitedir}/reportlab/graphics/barcode
140 %{py_sitedir}/reportlab/graphics/barcode/*.py[co]
141 %dir %{py_sitedir}/reportlab/graphics/charts
142 %{py_sitedir}/reportlab/graphics/charts/*.py[co]
143 %dir %{py_sitedir}/reportlab/graphics/widgets
144 %{py_sitedir}/reportlab/graphics/widgets/*.py[co]
145 %dir %{py_sitedir}/reportlab/lib
146 %attr(755,root,root) %{py_sitedir}/reportlab/lib/_rl_accel.so
147 %attr(755,root,root) %{py_sitedir}/reportlab/lib/pyHnj.so
148 %{py_sitedir}/reportlab/lib/*.py[co]
149 %{py_sitedir}/reportlab/lib/hyphen.mashed
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]
156
157 %files examples
158 %defattr(644,root,root,755)
159 %dir %{_examplesdir}/%{name}-%{version}
160 %{_examplesdir}/%{name}-%{version}/demos
161 %{_examplesdir}/%{name}-%{version}/pythonpoint-demos
This page took 0.031471 seconds and 2 git commands to generate.