diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:42:52 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 17:42:52 +0000 |
commit | 61be886e0b4d7457e7cded0fed04cdd6ced028e3 (patch) | |
tree | 2b46b4dae43d7428ff96e3b613c72b989cbac3e6 | |
parent | 8aac12d657d5c2209ad693fea90d44349e1d6bdc (diff) |
automatic import of python-typeguard
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-typeguard.spec | 206 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 208 insertions, 0 deletions
@@ -0,0 +1 @@ +/typeguard-2.13.3.tar.gz diff --git a/python-typeguard.spec b/python-typeguard.spec new file mode 100644 index 0000000..711e706 --- /dev/null +++ b/python-typeguard.spec @@ -0,0 +1,206 @@ +%global _empty_manifest_terminate_build 0 +Name: python-typeguard +Version: 2.13.3 +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/3a/38/c61bfcf62a7b572b5e9363a802ff92559cb427ee963048e1442e3aef7490/typeguard-2.13.3.tar.gz +BuildArch: noarch + +Requires: python3-sphinx-rtd-theme +Requires: python3-sphinx-autodoc-typehints +Requires: python3-pytest +Requires: python3-typing-extensions +Requires: python3-mypy + +%description +.. image:: https://travis-ci.com/agronholm/typeguard.svg?branch=master + :target: https://travis-ci.com/agronholm/typeguard + :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 + +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. + +Four principal ways to do type checking are provided, each with its pros and cons: + +#. the ``check_argument_types()`` and ``check_return_type()`` functions: + + * debugger friendly (except when running with the pydev debugger with the C extension installed) + * does not work reliably with dynamically defined type hints (e.g. in nested functions) +#. the ``@typechecked`` decorator: + + * automatically type checks yields and sends of returned generators (regular and async) + * adds an extra frame to the call stack for every call to a decorated function +#. the stack profiler hook (``with TypeChecker('packagename'):``) (deprecated): + + * emits warnings instead of raising ``TypeError`` + * requires very few modifications to the code + * multiple TypeCheckers can be stacked/nested + * does not work reliably with dynamically defined type hints (e.g. in nested functions) + * may cause problems with badly behaving debuggers or profilers + * cannot distinguish between an exception being raised and a ``None`` being returned +#. the import hook (``typeguard.importhook.install_import_hook()``): + + * automatically annotates classes and functions with ``@typechecked`` on import + * no code changes required in target modules + * requires imports of modules you need to check to be deferred until after the import hook has + been installed + * may clash with other import hooks + +See the documentation_ for further instructions. + +.. _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://travis-ci.com/agronholm/typeguard.svg?branch=master + :target: https://travis-ci.com/agronholm/typeguard + :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 + +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. + +Four principal ways to do type checking are provided, each with its pros and cons: + +#. the ``check_argument_types()`` and ``check_return_type()`` functions: + + * debugger friendly (except when running with the pydev debugger with the C extension installed) + * does not work reliably with dynamically defined type hints (e.g. in nested functions) +#. the ``@typechecked`` decorator: + + * automatically type checks yields and sends of returned generators (regular and async) + * adds an extra frame to the call stack for every call to a decorated function +#. the stack profiler hook (``with TypeChecker('packagename'):``) (deprecated): + + * emits warnings instead of raising ``TypeError`` + * requires very few modifications to the code + * multiple TypeCheckers can be stacked/nested + * does not work reliably with dynamically defined type hints (e.g. in nested functions) + * may cause problems with badly behaving debuggers or profilers + * cannot distinguish between an exception being raised and a ``None`` being returned +#. the import hook (``typeguard.importhook.install_import_hook()``): + + * automatically annotates classes and functions with ``@typechecked`` on import + * no code changes required in target modules + * requires imports of modules you need to check to be deferred until after the import hook has + been installed + * may clash with other import hooks + +See the documentation_ for further instructions. + +.. _documentation: https://typeguard.readthedocs.io/en/latest/ + + + + +%package help +Summary: Development documents and examples for typeguard +Provides: python3-typeguard-doc +%description help +.. image:: https://travis-ci.com/agronholm/typeguard.svg?branch=master + :target: https://travis-ci.com/agronholm/typeguard + :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 + +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. + +Four principal ways to do type checking are provided, each with its pros and cons: + +#. the ``check_argument_types()`` and ``check_return_type()`` functions: + + * debugger friendly (except when running with the pydev debugger with the C extension installed) + * does not work reliably with dynamically defined type hints (e.g. in nested functions) +#. the ``@typechecked`` decorator: + + * automatically type checks yields and sends of returned generators (regular and async) + * adds an extra frame to the call stack for every call to a decorated function +#. the stack profiler hook (``with TypeChecker('packagename'):``) (deprecated): + + * emits warnings instead of raising ``TypeError`` + * requires very few modifications to the code + * multiple TypeCheckers can be stacked/nested + * does not work reliably with dynamically defined type hints (e.g. in nested functions) + * may cause problems with badly behaving debuggers or profilers + * cannot distinguish between an exception being raised and a ``None`` being returned +#. the import hook (``typeguard.importhook.install_import_hook()``): + + * automatically annotates classes and functions with ``@typechecked`` on import + * no code changes required in target modules + * requires imports of modules you need to check to be deferred until after the import hook has + been installed + * may clash with other import hooks + +See the documentation_ for further instructions. + +.. _documentation: https://typeguard.readthedocs.io/en/latest/ + + + + +%prep +%autosetup -n typeguard-2.13.3 + +%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 +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 2.13.3-1 +- Package Spec generated @@ -0,0 +1 @@ +22d49971f62f3baa3525349b1e03723d typeguard-2.13.3.tar.gz |