[packages/python3-yamlloader] - updated to 1.6.0, added doc and tests

qboosh qboosh at pld-linux.org
Sat Feb 14 09:38:56 CET 2026


commit d912a7f7daa715400a1572fa3aa11ff3f091074b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Feb 14 09:38:51 2026 +0100

    - updated to 1.6.0, added doc and tests

 python3-yamlloader.spec | 66 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 60 insertions(+), 6 deletions(-)
---
diff --git a/python3-yamlloader.spec b/python3-yamlloader.spec
index 712362b..1fed92e 100644
--- a/python3-yamlloader.spec
+++ b/python3-yamlloader.spec
@@ -1,20 +1,39 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+
 Summary:	Ordered YAML loader and dumper for PyYAML
 Summary(pl.UTF-8):	Moduł dla PyYAML-a do wczytywania i zapisywania YAML-a z zachowaniem porządku
 Name:		python3-yamlloader
-Version:	1.5.2
-Release:	2
+Version:	1.6.0
+Release:	1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/yamlloader/
 Source0:	https://files.pythonhosted.org/packages/source/y/yamlloader/yamlloader-%{version}.tar.gz
-# Source0-md5:	c806c13b6d85c2b87063dcbc37678066
+# Source0-md5:	5cbbd0a65723cad5021713a2d7da91a0
 URL:		https://pypi.org/project/yamlloader/
 BuildRequires:	python3-build
+BuildRequires:	python3-hatch-vcs
+BuildRequires:	python3-hatchling
 BuildRequires:	python3-installer
-BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-modules >= 1:3.8
+%if %{with tests}
+BuildRequires:	python3-PyYAML
+BuildRequires:	python3-hypothesis
+BuildRequires:	python3-pytest
+%endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python3-modules >= 1:3.6
+BuildRequires:	rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires:	python3-PyYAML
+BuildRequires:	python3-sphinx_rtd_theme
+BuildRequires:	python3-sphinx_autodoc_typehints
+BuildRequires:	python3-sphinxcontrib-apidoc
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python3-modules >= 1:3.8
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -30,12 +49,41 @@ PyYAML-a. Obecnie obsługiwane są struktury OrderedDict, pozwalające na
 zachowanie kolejności między wczytaniem a zrzucaniem (dla Pythona 3.7+
 obsługiwane są także zwykłe słowniki).
 
+%package apidocs
+Summary:	API documentation for Python yamlloader module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona yamlloader
+Group:		Documentation
+
+%description apidocs
+API documentation for Python yamlloader module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona yamlloader.
+
 %prep
 %setup -q -n yamlloader-%{version}
 
 %build
 %py3_build_pyproject
 
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+# see docs/make_docs.sh
+cd docs
+# already done in sdist
+#sphinx-apidoc-3 -o api ../src/yamlloader -fMeT
+# script missing in sdist
+#%{__python3} api/tools/change_headline.py api/yamlloader.*
+cd ..
+PYTHONPATH=$(pwd)/src \
+sphinx-build-3 -b html docs/api docs/_build/html
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -49,3 +97,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc LICENSE README.rst
 %{py3_sitescriptdir}/yamlloader
 %{py3_sitescriptdir}/yamlloader-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_modules,_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-yamlloader.git/commitdiff/d912a7f7daa715400a1572fa3aa11ff3f091074b



More information about the pld-cvs-commit mailing list