[packages/python-readme_renderer] - initial

qboosh qboosh at pld-linux.org
Fri Dec 5 19:19:35 CET 2025


commit 0d75072c2df03d8810b4b550652704fa18c6f1f0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Dec 5 19:19:38 2025 +0100

    - initial

 python-readme_renderer.spec | 131 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 131 insertions(+)
---
diff --git a/python-readme_renderer.spec b/python-readme_renderer.spec
new file mode 100644
index 0000000..877e3d7
--- /dev/null
+++ b/python-readme_renderer.spec
@@ -0,0 +1,131 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (built from python3-readme_renderer.spec)
+
+Summary:	Library for rendering "readme" descriptions for Warehouse
+Summary(pl.UTF-8):	Biblioteka do renderowania opisów "readme" dla Warehouse'a
+Name:		python-readme_renderer
+# keep 28.x here for python2 support
+Version:	28.0
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/readme-renderer/
+Source0:	https://files.pythonhosted.org/packages/source/r/readme-renderer/readme_renderer-%{version}.tar.gz
+# Source0-md5:	32550499e18fe6696a3cc9457cc6be1d
+URL:		https://pypi.org/project/readme-renderer/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-bleach >= 2.1.0
+BuildRequires:	python-docutils >= 0.13.1
+BuildRequires:	python-mock
+BuildRequires:	python-pygments >= 2.5.1
+BuildRequires:	python-pytest
+BuildRequires:	python-six
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.5
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-bleach >= 2.1.0
+BuildRequires:	python3-docutils >= 0.13.1
+BuildRequires:	python3-mock
+BuildRequires:	python3-pygments >= 2.5.1
+BuildRequires:	python3-pytest
+BuildRequires:	python3-six
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Readme Renderer is a library that will safely render arbitrary README
+files into HTML. It is designed to be used in Warehouse to render the
+long_description for packages. It can handle Markdown,
+reStructuredText (.rst), and plain text.
+
+%description -l pl.UTF-8
+Readme Renderer to biblioteka pozwalająca bezpiecznie renderować
+dowolne pliki README do formatu HTML. Jest zaprojektowana z myślą o
+użyciu w Warehouse'ie do renderowania long_description dla pakietów.
+Potrafi obsłużyć Markdown, reStructuredText (.rst) oraz zwykły tekst.
+
+%package -n python3-readme_renderer
+Summary:	Library for rendering "readme" descriptions for Warehouse
+Summary(pl.UTF-8):	Biblioteka do renderowania opisów "readme" dla Warehouse'a
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.5
+
+%description -n python3-readme_renderer
+Readme Renderer is a library that will safely render arbitrary README
+files into HTML. It is designed to be used in Warehouse to render the
+long_description for packages. It can handle Markdown,
+reStructuredText (.rst), and plain text.
+
+%description -n python3-readme_renderer -l pl.UTF-8
+Readme Renderer to biblioteka pozwalająca bezpiecznie renderować
+dowolne pliki README do formatu HTML. Jest zaprojektowana z myślą o
+użyciu w Warehouse'ie do renderowania long_description dla pakietów.
+Potrafi obsłużyć Markdown, reStructuredText (.rst) oraz zwykły tekst.
+
+%prep
+%setup -q -n readme_renderer-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.rst README.rst
+%{py_sitescriptdir}/readme_renderer
+%{py_sitescriptdir}/readme_renderer-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-readme_renderer
+%defattr(644,root,root,755)
+%doc CHANGES.rst README.rst
+%{py3_sitescriptdir}/readme_renderer
+%{py3_sitescriptdir}/readme_renderer-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-readme_renderer.git/commitdiff/0d75072c2df03d8810b4b550652704fa18c6f1f0




More information about the pld-cvs-commit mailing list