%global _empty_manifest_terminate_build 0
Name: python-typeguard
Version: 3.0.2
Release: 1
Summary: Run-time type checker for Python
License: MIT
URL: https://pypi.org/project/typeguard/
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/af/40/3398497c6e6951c92abaf933492d6633e7ac4df0bfc9d81f304b3f977f15/typeguard-3.0.2.tar.gz
BuildArch: noarch
Requires: python3-importlib-metadata
Requires: python3-typing-extensions
Requires: python3-packaging
Requires: python3-sphinx-rtd-theme
Requires: python3-sphinx-autodoc-typehints
Requires: python3-pytest
Requires: python3-mypy
%description
.. image:: https://github.com/agronholm/typeguard/actions/workflows/test.yml/badge.svg
:target: https://github.com/agronholm/typeguard/actions/workflows/test.yml
:alt: Build Status
.. image:: https://coveralls.io/repos/agronholm/typeguard/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/agronholm/typeguard?branch=master
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/typeguard/badge/?version=latest
:target: https://typeguard.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
This library provides run-time type checking for functions defined with
`PEP 484 `_ 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.
Two principal ways to do type checking are provided:
#. The ``check_type`` function:
* like ``isinstance()``, but supports arbitrary type annotations (within limits)
* can be used as a ``cast()`` replacement, but with actual checking of the value
#. Code instrumentation:
* entire modules, or individual functions (via ``@typechecked``) are recompiled, with
type checking code injected into them
* automatically checks function arguments, return values and assignments to annotated
local variables
* for generator functions (regular and async), checks yield and send values
* requires the original source code of the instrumented module(s) to be accessible
Two options are provided for code instrumentation:
#. the ``@typechecked`` function:
* can be applied to functions individually
#. the import hook (``typeguard.importhook.install_import_hook()``):
* automatically instruments targeted modules on import
* no manual code changes required in the target modules
* requires the import hook to be installed before the targeted modules are imported
* may clash with other import hooks
See the documentation_ for further information.
.. _documentation: https://typeguard.readthedocs.io/en/latest/
%package -n python3-typeguard
Summary: Run-time type checker for Python
Provides: python-typeguard
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-typeguard
.. image:: https://github.com/agronholm/typeguard/actions/workflows/test.yml/badge.svg
:target: https://github.com/agronholm/typeguard/actions/workflows/test.yml
:alt: Build Status
.. image:: https://coveralls.io/repos/agronholm/typeguard/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/agronholm/typeguard?branch=master
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/typeguard/badge/?version=latest
:target: https://typeguard.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
This library provides run-time type checking for functions defined with
`PEP 484 `_ 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.
Two principal ways to do type checking are provided:
#. The ``check_type`` function:
* like ``isinstance()``, but supports arbitrary type annotations (within limits)
* can be used as a ``cast()`` replacement, but with actual checking of the value
#. Code instrumentation:
* entire modules, or individual functions (via ``@typechecked``) are recompiled, with
type checking code injected into them
* automatically checks function arguments, return values and assignments to annotated
local variables
* for generator functions (regular and async), checks yield and send values
* requires the original source code of the instrumented module(s) to be accessible
Two options are provided for code instrumentation:
#. the ``@typechecked`` function:
* can be applied to functions individually
#. the import hook (``typeguard.importhook.install_import_hook()``):
* automatically instruments targeted modules on import
* no manual code changes required in the target modules
* requires the import hook to be installed before the targeted modules are imported
* may clash with other import hooks
See the documentation_ for further information.
.. _documentation: https://typeguard.readthedocs.io/en/latest/
%package help
Summary: Development documents and examples for typeguard
Provides: python3-typeguard-doc
%description help
.. image:: https://github.com/agronholm/typeguard/actions/workflows/test.yml/badge.svg
:target: https://github.com/agronholm/typeguard/actions/workflows/test.yml
:alt: Build Status
.. image:: https://coveralls.io/repos/agronholm/typeguard/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/agronholm/typeguard?branch=master
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/typeguard/badge/?version=latest
:target: https://typeguard.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
This library provides run-time type checking for functions defined with
`PEP 484 `_ 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.
Two principal ways to do type checking are provided:
#. The ``check_type`` function:
* like ``isinstance()``, but supports arbitrary type annotations (within limits)
* can be used as a ``cast()`` replacement, but with actual checking of the value
#. Code instrumentation:
* entire modules, or individual functions (via ``@typechecked``) are recompiled, with
type checking code injected into them
* automatically checks function arguments, return values and assignments to annotated
local variables
* for generator functions (regular and async), checks yield and send values
* requires the original source code of the instrumented module(s) to be accessible
Two options are provided for code instrumentation:
#. the ``@typechecked`` function:
* can be applied to functions individually
#. the import hook (``typeguard.importhook.install_import_hook()``):
* automatically instruments targeted modules on import
* no manual code changes required in the target modules
* requires the import hook to be installed before the targeted modules are imported
* may clash with other import hooks
See the documentation_ for further information.
.. _documentation: https://typeguard.readthedocs.io/en/latest/
%prep
%autosetup -n typeguard-3.0.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-typeguard -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Apr 10 2023 Python_Bot - 3.0.2-1
- Package Spec generated