[packages/python3-typeguard] - new

qboosh qboosh at pld-linux.org
Mon Nov 24 16:59:21 CET 2025


commit dcd4594a368ed705a3d3c6e18e330a67a585b024
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Nov 24 16:59:19 2025 +0100

    - new

 python3-typeguard.spec | 110 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)
---
diff --git a/python3-typeguard.spec b/python3-typeguard.spec
new file mode 100644
index 0000000..5f2543e
--- /dev/null
+++ b/python3-typeguard.spec
@@ -0,0 +1,110 @@
+#
+# Conditional build:
+%bcond_without	doc	# API documentation
+%bcond_without	tests	# unit tests
+
+Summary:	Run-time type checker for Python
+Summary(pl.UTF-8):	Sprawdzanie typów dla Pythona w trakcie działania
+Name:		python3-typeguard
+Version:	4.4.4
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/typeguard/
+Source0:	https://files.pythonhosted.org/packages/source/t/typeguard/typeguard-%{version}.tar.gz
+# Source0-md5:	4f97177b802372a70bb571b2aff09313
+URL:		https://pypi.org/project/typeguard/
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.9
+BuildRequires:	python3-setuptools >= 1:77
+BuildRequires:	python3-setuptools_scm >= 6.4
+%if %{with tests}
+%if "%{py3_ver}" == "3.9"
+BuildRequires:	python3-importlib_metadata >= 3.6
+%endif
+BuildRequires:	python3-mypy >= 1.2.0
+BuildRequires:	python3-pytest >= 7
+BuildRequires:	python3-typing_extensions >= 4.14.0
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.044
+BuildRequires:	sed >= 4.0
+%if %{with doc}
+BuildRequires:	python3-packaging
+BuildRequires:	python3-sphinx_autodoc_typehints >= 1.2.0
+BuildRequires:	python3-sphinx_rtd_theme >= 1.3.0
+BuildRequires:	sphinx-pdg-3 >= 7
+%endif
+Requires:	python3-modules >= 1:3.9
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This library provides run-time type checking for functions defined
+with PEP 484 (<https://www.python.org/dev/peps/pep-0484/>) argument
+(and return) type annotations, and any arbitrary objects. It can be
+used together with static type checkers as an additional layer of type
+safety, to catch type violations that could only be detected at run
+time.
+
+%description -l pl.UTF-8
+Ta biblioteka zapewnia sprawdzanie typów w czasie działania dla
+funkcji zdefiniowanych z użyciem adnotacji typów argumentów (i
+wartości zwracanej) oraz dowolnych obiektów wg PEP 484
+(<https://www.python.org/dev/peps/pep-0484/>). Może być używana wraz z
+narzędziami do statycznego sprawdzania typów, jako dodatkowa warstwa
+bezpieczeństwa typów, aby wyłapać naruszenia typów, które można wykryć
+tylko w czasie działania.
+
+%package apidocs
+Summary:	API documentation for Python typeguard module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona typeguard
+Group:		Documentation
+
+%description apidocs
+API documentation for Python typeguard module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona typeguard.
+
+%prep
+%setup -q -n typeguard-%{version}
+
+# conflicts with loading via PYTEST_PLUGINS=typeguard._pytest_plugin
+%{__sed} -i -e '/pytester.plugins = \["typeguard"\]/d' tests/test_pytest_plugin.py
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=typeguard._pytest_plugin \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd)/src \
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitescriptdir}/typeguard
+%{py3_sitescriptdir}/typeguard-%{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-typeguard.git/commitdiff/dcd4594a368ed705a3d3c6e18e330a67a585b024




More information about the pld-cvs-commit mailing list