[packages/python3-rst2pdf] - new, based on python-rst2pdf.spec; versions 0.98+ are python3 only

qboosh qboosh at pld-linux.org
Sun Dec 13 21:23:09 CET 2020


commit 818060cb3172326f92fb22b04059d9d1d94c3ad3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 13 21:23:33 2020 +0100

    - new, based on python-rst2pdf.spec; versions 0.98+ are python3 only

 python3-rst2pdf.spec | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
---
diff --git a/python3-rst2pdf.spec b/python3-rst2pdf.spec
new file mode 100644
index 0000000..289263b
--- /dev/null
+++ b/python3-rst2pdf.spec
@@ -0,0 +1,103 @@
+#
+# Conditional build:
+%bcond_without	doc	# manual and documentation
+
+Summary:	Convert reStructured Text to PDF via ReportLab
+Summary(pl.UTF-8):	Konwersja formatu reStructured Text do PDF przy użyciu ReportLaba
+Name:		python3-rst2pdf
+Version:	0.98
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/rst2pdf/
+Source0:	https://files.pythonhosted.org/packages/source/r/rst2pdf/rst2pdf-%{version}.tar.gz
+# Source0-md5:	e69ec43a091024e62f375e471c5c2c81
+URL:		https://rst2pdf.org/
+BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	sed >= 4.0
+%if %{with doc}
+BuildRequires:	docutils
+BuildRequires:	python3-ReportLab
+BuildRequires:	python3-docutils
+BuildRequires:	python3-importlib_metadata
+BuildRequires:	python3-jinja2
+BuildRequires:	python3-packaging
+BuildRequires:	python3-pygments
+# gen_docs.sh calls rst2pdf from $PATH
+BuildRequires:	python3-rst2pdf
+BuildRequires:	python3-smartypants
+%endif
+Requires:	python3-modules >= 1:3.6
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The usual way of creating PDF from reStructuredText is by going
+through LaTeX. This tool provides an alternative by producing PDF
+directly using the ReportLab library.
+
+%description -l pl.UTF-8
+Najczęstszym sposobem tworzenia dokumentów PDF z formatu
+reStructuredText jest przejście przez LaTeX. To narzędzie udostępnia
+alternatywną metodę, tworząc PDF bezpośrednio przy użyciu biblioteki
+ReportLab.
+
+%package doc
+Summary:	Manual for rst2pdf library
+Summary(pl.UTF-8):	Podręcznik do biblioteki rst2pdf
+Group:		Documentation
+
+%description doc
+Manual for rst2pdf library.
+
+%description doc -l pl.UTF-8
+Podręcznik do biblioteki rst2pdf.
+
+%prep
+%setup -q -n rst2pdf-%{version}
+
+%{__sed} -i -e 's,python ,%{__python3} ,' doc/gen_docs.sh
+
+%build
+%py3_build
+
+%if %{with doc}
+cd doc
+./gen_docs.sh
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/rst2pdf{,-3}
+ln -sf rst2pdf-3 $RPM_BUILD_ROOT%{_bindir}/rst2pdf
+
+%if %{with doc}
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p doc/output/rst2pdf.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/rst2pdf
+%attr(755,root,root) %{_bindir}/rst2pdf-3
+%{py3_sitescriptdir}/rst2pdf
+%{py3_sitescriptdir}/rst2pdf-%{version}-py*.egg-info
+%if %{with doc}
+%{_mandir}/man1/rst2pdf.1*
+%endif
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc doc/output/html/{assets,manual.html} doc/output/pdf/manual.pdf
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-rst2pdf.git/commitdiff/818060cb3172326f92fb22b04059d9d1d94c3ad3



More information about the pld-cvs-commit mailing list