%global _empty_manifest_terminate_build 0
Name: python-pytypes
Version: 1.0b10
Release: 1
Summary: Typing toolbox for Python 3 _and_ 2.
License: Apache-2.0
URL: https://github.com/Stewori/pytypes
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0c/cf/ed8169e562bb33049fcc5aac113ba51c88d3295391b9a2328f6402b32146/pytypes-1.0b10.tar.gz
BuildArch: noarch
Requires: python3-typing
%description
pytypes is a typing toolbox w.r.t. `PEP
484 `__ (PEP
`526 `__ on the road map,
later also `544 `__ if it
gets accepted).
Its main features are currently
- ``@typechecked`` decorator for runtime typechecking with support for `stubfiles `__ and `type comments `__
- ``@override`` decorator that asserts existence of a type-compatible parent method
- ``@annotations`` decorator to turn type info from stubfiles or from type comments into ``__annotations__``
- ``@typelogged`` decorator observes function and method calls at runtime and generates stubfiles from acquired type info
- service functions to apply these decorators module wide or even globally, i.e. runtime wide
- typechecking can alternatively be done in decorator-free manner (friendlier for debuggers)
- all the above decorators work smoothly with OOP, i.e. with methods, static methods, class methods and properties, even if classes are nested
- converter for stubfiles to Python 2.7 compliant form
- lots of utility functions regarding types, e.g. a Python 2.7 compliant and actually functional implementation of ``get_type_hints``
- full Python 2.7 support for all these features
An additional future goal will be integration with the Java typing system when running on Jython. Along with this, some generator utilities to produce type-safe Java bindings for Python frameworks are planned.
In wider sense, PEP 484-style type annotations can be used to build type safe interfaces to allow also other programming languages to call into Python code (kind of reverse FFI). In this sense the project name refers to 'ctypes', which provides Python-bindings of C.
%package -n python3-pytypes
Summary: Typing toolbox for Python 3 _and_ 2.
Provides: python-pytypes
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-pytypes
pytypes is a typing toolbox w.r.t. `PEP
484 `__ (PEP
`526 `__ on the road map,
later also `544 `__ if it
gets accepted).
Its main features are currently
- ``@typechecked`` decorator for runtime typechecking with support for `stubfiles `__ and `type comments `__
- ``@override`` decorator that asserts existence of a type-compatible parent method
- ``@annotations`` decorator to turn type info from stubfiles or from type comments into ``__annotations__``
- ``@typelogged`` decorator observes function and method calls at runtime and generates stubfiles from acquired type info
- service functions to apply these decorators module wide or even globally, i.e. runtime wide
- typechecking can alternatively be done in decorator-free manner (friendlier for debuggers)
- all the above decorators work smoothly with OOP, i.e. with methods, static methods, class methods and properties, even if classes are nested
- converter for stubfiles to Python 2.7 compliant form
- lots of utility functions regarding types, e.g. a Python 2.7 compliant and actually functional implementation of ``get_type_hints``
- full Python 2.7 support for all these features
An additional future goal will be integration with the Java typing system when running on Jython. Along with this, some generator utilities to produce type-safe Java bindings for Python frameworks are planned.
In wider sense, PEP 484-style type annotations can be used to build type safe interfaces to allow also other programming languages to call into Python code (kind of reverse FFI). In this sense the project name refers to 'ctypes', which provides Python-bindings of C.
%package help
Summary: Development documents and examples for pytypes
Provides: python3-pytypes-doc
%description help
pytypes is a typing toolbox w.r.t. `PEP
484 `__ (PEP
`526 `__ on the road map,
later also `544 `__ if it
gets accepted).
Its main features are currently
- ``@typechecked`` decorator for runtime typechecking with support for `stubfiles `__ and `type comments `__
- ``@override`` decorator that asserts existence of a type-compatible parent method
- ``@annotations`` decorator to turn type info from stubfiles or from type comments into ``__annotations__``
- ``@typelogged`` decorator observes function and method calls at runtime and generates stubfiles from acquired type info
- service functions to apply these decorators module wide or even globally, i.e. runtime wide
- typechecking can alternatively be done in decorator-free manner (friendlier for debuggers)
- all the above decorators work smoothly with OOP, i.e. with methods, static methods, class methods and properties, even if classes are nested
- converter for stubfiles to Python 2.7 compliant form
- lots of utility functions regarding types, e.g. a Python 2.7 compliant and actually functional implementation of ``get_type_hints``
- full Python 2.7 support for all these features
An additional future goal will be integration with the Java typing system when running on Jython. Along with this, some generator utilities to produce type-safe Java bindings for Python frameworks are planned.
In wider sense, PEP 484-style type annotations can be used to build type safe interfaces to allow also other programming languages to call into Python code (kind of reverse FFI). In this sense the project name refers to 'ctypes', which provides Python-bindings of C.
%prep
%autosetup -n pytypes-1.0b10
%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-pytypes -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Apr 25 2023 Python_Bot - 1.0b10-1
- Package Spec generated