[packages/python3-annotated_types] - new

qboosh qboosh at pld-linux.org
Sun Jul 13 11:57:29 CEST 2025


commit f29b8f0df79b58e6b458574a928db037996167ba
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 13 11:58:47 2025 +0200

    - new

 python3-annotated_types.spec | 91 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
---
diff --git a/python3-annotated_types.spec b/python3-annotated_types.spec
new file mode 100644
index 0000000..6fc0ac5
--- /dev/null
+++ b/python3-annotated_types.spec
@@ -0,0 +1,91 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+Summary:	Reusable constraint types to use with typing.Annotated
+Summary(pl.UTF-8):	Przydatne typy ograniczeń do używania z typing.Annotated
+Name:		python3-annotated_types
+Version:	0.7.0
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/annotated-types/
+Source0:	https://files.pythonhosted.org/packages/source/a/annotated-types/annotated_types-%{version}.tar.gz
+# Source0-md5:	5c943b7c51b0b7dcadf46da4a99c84a1
+URL:		https://pypi.org/project/annotated-types/
+BuildRequires:	python3-build
+BuildRequires:	python3-hatchling
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.8
+%if %{with tests}
+BuildRequires:	python3-pytest
+%if "%{py3_ver}" == "3.8"
+BuildRequires:	python3-typing_extensions >= 4.0.0
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.044
+Requires:	python3-modules >= 1:3.8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+PEP-593 added "typing.Annotated" as a way of adding context-specific
+metadata to existing types, and specifies that "Annotated[T, x]"
+should be treated as "T" by any tool or library without special logic
+for "x".
+
+This package provides metadata objects which can be used to represent
+common constraints such as upper and lower bounds on scalar values and
+collection sizes, a "Predicate" marker for runtime checks, and
+descriptions of how we intend these metadata to be interpreted.
+
+%description -l pl.UTF-8
+PEP-593 dodało "typing.Annotated" jako sposób dodawania zależnych od
+kontekstu medanych do istniejących typów i określa, że "Annotated[T,
+x]" powinno być traktowane przez narządzia lub biblioteki jako "T" bez
+specjalnej logiki dla "x".
+
+Ten pakiet udostępnia obiekty metadanych, których można używać do
+reprezentowania powszechnych ograniczeń, takich jak górna i dolna
+granica wartości skalarnych, rozmiary kolekcji, znacznik "Predicate"
+do sprawdzania w trakcie działania oraz opisy, jak zamierzamy
+interpretować te metadane.
+
+%package apidocs
+Summary:	API documentation for Python annotated_types module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona annotated_types
+Group:		Documentation
+
+%description apidocs
+API documentation for Python annotated_types module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona annotated_types.
+
+%prep
+%setup -q -n annotated_types-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+#%{__python3} -m zipfile -e build-3/*.whl build-3-test
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd) \
+%{__python3} -m pytest tests
+%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.md
+%{py3_sitescriptdir}/annotated_types
+%{py3_sitescriptdir}/annotated_types-%{version}.dist-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-annotated_types.git/commitdiff/f29b8f0df79b58e6b458574a928db037996167ba



More information about the pld-cvs-commit mailing list