[packages/python-ReportLab] - updated to 3.5.34 - added python3 modules
qboosh
qboosh at pld-linux.org
Sat Mar 7 21:06:09 CET 2020
commit f1821ff580bfaebc6e7d905b57cb1a8e2bf78bd1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 7 21:06:43 2020 +0100
- updated to 3.5.34
- added python3 modules
python-ReportLab.spec | 194 +++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 154 insertions(+), 40 deletions(-)
---
diff --git a/python-ReportLab.spec b/python-ReportLab.spec
index 1bbd51c..f2d8b8a 100644
--- a/python-ReportLab.spec
+++ b/python-ReportLab.spec
@@ -1,39 +1,41 @@
#
# Conditional build:
%bcond_without doc # PDF documentation
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
# TODO:
-# - python3 (3.3+) package
-# - use system fonts:
-# /usr/lib/python2.7/site-packages/reportlab/fonts/VeraBI.ttf
-# - Check if docs/*.pdf is generated using _installed_ ReportLab
-# so build may fail if ReportLab is not installed on builder
-# - Standard T1 font curves (source1) maybe should be packaged in other package?
+# - use system fonts (see files lists) or share fonts for both python versions
+# - tools/docco and tools/pythonpoint as subpackages?
%define module ReportLab
-Summary: Python library for generating PDFs and graphics
-Summary(pl.UTF-8): Moduły Pythona do generowania PDF-ów oraz grafik
+Summary: Python 2 library for generating PDFs and graphics
+Summary(pl.UTF-8): Moduły Pythona 2 do generowania PDF-ów oraz grafik
Name: python-%{module}
-Version: 3.3.0
+Version: 3.5.34
Release: 1
License: BSD-like
Group: Libraries/Python
-#Source0Download: https://bitbucket.org/rptlab/reportlab/downloads
-Source0: https://pypi.python.org/packages/b8/17/7c5342dfbc9dc856173309270006e34c3bfad59934f0faa1dcc117ac93f1/reportlab-%{version}.tar.gz
-# Source0-md5: 8ad6181b69ec515d4f6d8bb894682d5d
-Source1: http://www.reportlab.com/ftp/fonts/pfbfer.zip
-# Source1-md5: 35d20e26490cb2a8646fab6276ac6a4c
+#Source0Download: https://bitbucket.org/rptlab/reportlab/downloads/?tab=tags
+Source0: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz
+# Source0-md5: 77d37a7f9f785b3666206de0fbc44aab
Patch0: %{name}-setup.patch
-URL: http://www.reportlab.org/
+URL: https://www.reportlab.com/dev/opensource/
BuildRequires: freetype-devel >= 2
BuildRequires: libart_lgpl-devel >= 2
-%{?with_doc:BuildRequires: python-PIL}
+%if %{with python2}
BuildRequires: python-devel >= 1:2.7
+BuildRequires: python-setuptools
+%endif
+%{?with_doc:BuildRequires: python-pillow >= 4.0.0}
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3-setuptools
+%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: unzip
-Requires: python >= 1:2.7
-Requires: python-PIL
+Requires: python-modules >= 1:2.7
Obsoletes: ReportLab
Obsoletes: python-ReportLab-barcode
Obsoletes: python-ReportLab-renderPM
@@ -47,8 +49,6 @@ independant PDFs and graphics.
architecture
- Graphics: provides primitive shapes, reusable widgets, sample
collections including business chart and diagrams
-- PythonPoint: a utility for generating PDF slides from a simple XML
- format
%description -l pl.UTF-8
Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych
@@ -57,14 +57,51 @@ od platformy PDF-ów oraz grafik.
warstwowej architekturze
- Grafika: podstawowe figury geometryczne, kontrolki, a także
przykłady, w tym wykresy i diagramy
-- PythonPoint: narzędzie do generowania slajdów w formacie PDF z
- prostego formatu XML
+
+%package -n python3-%{module}
+Summary: Python 3 library for generating PDFs and graphics
+Summary(pl.UTF-8): Moduły Pythona 3 do generowania PDF-ów oraz grafik
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.5
+
+%description -n python3-%{module}
+A library written in Python that lets you generate platform
+independant PDFs and graphics.
+- PDF generation: uses Python, a clean OO language, layered
+ architecture
+- Graphics: provides primitive shapes, reusable widgets, sample
+ collections including business chart and diagrams
+
+%description -n python3-%{module} -l pl.UTF-8
+Biblioteka napisana w Pythonie pozwalająca na generowanie niezależnych
+od platformy PDF-ów oraz grafik.
+- Generowanie PDF: używa Pythona, przejrzystego języka obiektowego o
+ warstwowej architekturze
+- Grafika: podstawowe figury geometryczne, kontrolki, a także
+ przykłady, w tym wykresy i diagramy
+
+%package apidocs
+Summary: API documentation for ReportLab module
+Summary(pl.UTF_8): Dokumentacja API modułu ReportLab
+Group: Documentation
+%if "%{_rpmversion}" >= "4.6"
+BuildArch: noarch
+%endif
+
+%description apidocs
+API documentation for ReportLab module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu ReportLab.
%package examples
Summary: Examples for ReportLab
Summary(pl.UTF-8): Przykłady do biblioteki ReportLab
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
+%if "%{_rpmversion}" >= "4.6"
+BuildArch: noarch
+%endif
%description examples
Examples for ReportLab.
@@ -73,17 +110,17 @@ Examples for ReportLab.
Przykłady do biblioteki ReportLab.
%prep
-# %setup -q -n rptlab-reportlab-6382a792db9e
%setup -q -n reportlab-%{version}
-
-%{__unzip} -qq -d src/reportlab/fonts %{SOURCE1}
-# Remove install_requires=['pillow>=2.4.0','pip>=1.4.1', 'setuptools>=2.2'],
-# which leads to bugus install requirements
-sed -i.bak '/install_requires/d' setup.py
-
%build
+%if %{with python2}
%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
%if %{with doc}
cd docs
PYTHONPATH=$(pwd)/../src %{__python} genAll.py
@@ -92,27 +129,38 @@ cd ..
%install
rm -rf $RPM_BUILD_ROOT
-%py_install
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}}
-install -p tools/pythonpoint/pythonpoint.py $RPM_BUILD_ROOT%{_bindir}
+%if %{with python2}
+%py_install
install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/reportlab
-cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -a tools/pythonpoint/demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
-
+%py_postclean
%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/reportlab/graphics/samples
+%endif
-%py_postclean
+%if %{with python3}
+%py3_install
+
+install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/reportlab
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/reportlab/graphics/samples
+%endif
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+# TODO: (whole) pythonpoint as subpackage?
+#install -p tools/pythonpoint/pythonpoint.py $RPM_BUILD_ROOT%{_bindir}
+#cp -a tools/pythonpoint/demos $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc CHANGES.md LICENSE.txt README.txt %{?with_doc:docs/reportlab-userguide.pdf}
-%attr(755,root,root) %{_bindir}/pythonpoint.py
+%doc CHANGES.md LICENSE.txt README.txt
%dir %{py_sitescriptdir}/reportlab
%dir %{py_sitedir}/reportlab
%{py_sitedir}/reportlab-%{version}-py*.egg-info
@@ -127,6 +175,9 @@ rm -rf $RPM_BUILD_ROOT
# Bitstream Vera font
%{py_sitedir}/reportlab/fonts/Vera*.ttf
%{py_sitedir}/reportlab/fonts/bitstream-vera-license.txt
+# ?
+%{py_sitedir}/reportlab/fonts/callig15.afm
+%{py_sitedir}/reportlab/fonts/callig15.pfb
# Adobe fonts
%{py_sitedir}/reportlab/fonts/_a*____.pfb
%{py_sitedir}/reportlab/fonts/_e*____.pfb
@@ -153,9 +204,72 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitedir}/reportlab/pdfgen/*.py[co]
%dir %{py_sitedir}/reportlab/platypus
%{py_sitedir}/reportlab/platypus/*.py[co]
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc CHANGES.md LICENSE.txt README.txt
+%dir %{py3_sitescriptdir}/reportlab
+%dir %{py3_sitedir}/reportlab
+%{py3_sitedir}/reportlab-%{version}-py*.egg-info
+%{py3_sitedir}/reportlab/*.py
+%{py3_sitedir}/reportlab/__pycache__
+%dir %{py3_sitedir}/reportlab/fonts
+%{py3_sitedir}/reportlab/fonts/00readme.txt
+# Dark Garden font (GPL v2+)
+%{py3_sitedir}/reportlab/fonts/DarkGardenMK.afm
+%{py3_sitedir}/reportlab/fonts/DarkGardenMK.pfb
+%{py3_sitedir}/reportlab/fonts/DarkGarden.sfd
+%{py3_sitedir}/reportlab/fonts/DarkGarden-*.txt
+# Bitstream Vera font
+%{py3_sitedir}/reportlab/fonts/Vera*.ttf
+%{py3_sitedir}/reportlab/fonts/bitstream-vera-license.txt
+# ?
+%{py3_sitedir}/reportlab/fonts/callig15.afm
+%{py3_sitedir}/reportlab/fonts/callig15.pfb
+# Adobe fonts
+%{py3_sitedir}/reportlab/fonts/_a*____.pfb
+%{py3_sitedir}/reportlab/fonts/_e*____.pfb
+%{py3_sitedir}/reportlab/fonts/co*____.pfb
+%{py3_sitedir}/reportlab/fonts/sy______.pfb
+%{py3_sitedir}/reportlab/fonts/z?______.pfb
+%dir %{py3_sitedir}/reportlab/graphics
+%attr(755,root,root) %{py3_sitedir}/reportlab/graphics/_renderPM.cpython-*.so
+%{py3_sitedir}/reportlab/graphics/*.py
+%{py3_sitedir}/reportlab/graphics/__pycache__
+%dir %{py3_sitedir}/reportlab/graphics/barcode
+%{py3_sitedir}/reportlab/graphics/barcode/*.py
+%{py3_sitedir}/reportlab/graphics/barcode/__pycache__
+%dir %{py3_sitedir}/reportlab/graphics/charts
+%{py3_sitedir}/reportlab/graphics/charts/*.py
+%{py3_sitedir}/reportlab/graphics/charts/__pycache__
+%dir %{py3_sitedir}/reportlab/graphics/widgets
+%{py3_sitedir}/reportlab/graphics/widgets/*.py
+%{py3_sitedir}/reportlab/graphics/widgets/__pycache__
+%dir %{py3_sitedir}/reportlab/lib
+%attr(755,root,root) %{py3_sitedir}/reportlab/lib/_rl_accel.cpython-*.so
+%{py3_sitedir}/reportlab/lib/*.py
+%{py3_sitedir}/reportlab/lib/__pycache__
+%{py3_sitedir}/reportlab/lib/hyphen.mashed
+%dir %{py3_sitedir}/reportlab/pdfbase
+%{py3_sitedir}/reportlab/pdfbase/*.py
+%{py3_sitedir}/reportlab/pdfbase/__pycache__
+%dir %{py3_sitedir}/reportlab/pdfgen
+%{py3_sitedir}/reportlab/pdfgen/*.py
+%{py3_sitedir}/reportlab/pdfgen/__pycache__
+%dir %{py3_sitedir}/reportlab/platypus
+%{py3_sitedir}/reportlab/platypus/*.py
+%{py3_sitedir}/reportlab/platypus/__pycache__
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/reportlab-userguide.pdf
+%endif
%files examples
%defattr(644,root,root,755)
%dir %{_examplesdir}/%{name}-%{version}
%{_examplesdir}/%{name}-%{version}/demos
-%{_examplesdir}/%{name}-%{version}/pythonpoint-demos
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-ReportLab.git/commitdiff/f1821ff580bfaebc6e7d905b57cb1a8e2bf78bd1
More information about the pld-cvs-commit
mailing list