[packages/python3-pytest-mock] - updated to 3.14.1, added -apidocs
qboosh
qboosh at pld-linux.org
Mon Jul 7 19:57:15 CEST 2025
commit 6224d880f6cdb2e338c3caf63e270027e412ccb6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Jul 7 19:58:46 2025 +0200
- updated to 3.14.1, added -apidocs
python3-pytest-mock.spec | 46 +++++++++++++++++++++++++++++++++++++---------
1 file changed, 37 insertions(+), 9 deletions(-)
---
diff --git a/python3-pytest-mock.spec b/python3-pytest-mock.spec
index 677ef46..403d60d 100644
--- a/python3-pytest-mock.spec
+++ b/python3-pytest-mock.spec
@@ -1,30 +1,37 @@
#
# Conditional build:
-%bcond_without tests # py.test tests
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # pytest tests
Summary: Thin-wrapper around the mock package for easier use with py.test
Summary(pl.UTF-8): Cienka warstwa obudowująca pakiet mock, ułatwiająca używanie wraz z py.test
Name: python3-pytest-mock
-Version: 3.14.0
+Version: 3.14.1
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/pytest-mock/
-Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
-# Source0-md5: c22f3c24300091f503258d1ba5159551
+Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest_mock-%{version}.tar.gz
+# Source0-md5: f0cc01a3fdc4155b381ef73301d4776f
URL: https://pypi.org/project/pytest-mock/
-BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-build
BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.8
+BuildRequires: python3-setuptools
%if %{with tests}
-BuildRequires: python3-pytest >= 5.0
+BuildRequires: python3-pytest >= 6.2.5
BuildRequires: python3-pytest-asyncio
# there is py3 test which relies on "mock" standalone module not being installed
BuildConflicts: python3-mock
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python3-modules >= 1:3.7
+%if %{with doc}
+BuildRequires: python3-furo
+BuildRequires: python3-sphinx_copybutton
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.8
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -38,8 +45,19 @@ Ta wtyczka instaluje osprzęt (fixture) do tworzenia atrap, będący
cienką warstwą ponad API dostarczane przez pakiet mock, ale
pozwalający nie martwić się o wycofywanie łat na końcu testu.
+%package apidocs
+Summary: API documentation for Python pytest_mock module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest_mock
+Group: Documentation
+
+%description apidocs
+API documentation for Python pytest_mock module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pytest_mock.
+
%prep
-%setup -q -n pytest-mock-%{version}
+%setup -q -n pytest_mock-%{version}
%build
%py3_build_pyproject
@@ -51,6 +69,10 @@ PYTEST_PLUGINS="pytest_asyncio.plugin,pytest_mock" \
%{__python3} -m pytest tests
%endif
+%if %{with doc}
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -61,6 +83,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CHANGELOG.rst LICENSE README.rst
+%doc CHANGELOG.rst LICENSE README.rst SECURITY.md
%{py3_sitescriptdir}/pytest_mock
%{py3_sitescriptdir}/pytest_mock-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-mock.git/commitdiff/6224d880f6cdb2e338c3caf63e270027e412ccb6
More information about the pld-cvs-commit
mailing list