diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-wrapt-timeout-decorator.spec | 117 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 119 insertions, 0 deletions
@@ -0,0 +1 @@ +/wrapt_timeout_decorator-1.3.12.2.tar.gz diff --git a/python-wrapt-timeout-decorator.spec b/python-wrapt-timeout-decorator.spec new file mode 100644 index 0000000..dbe89f3 --- /dev/null +++ b/python-wrapt-timeout-decorator.spec @@ -0,0 +1,117 @@ +%global _empty_manifest_terminate_build 0 +Name: python-wrapt-timeout-decorator +Version: 1.3.12.2 +Release: 1 +Summary: The better timout decorator +License: MIT License +URL: https://github.com/bitranox/wrapt_timeout_decorator +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/21/b7/a17ec87bff2974c0c0a52104f6f217dad986d73efacc96e46e39954a07af/wrapt_timeout_decorator-1.3.12.2.tar.gz +BuildArch: noarch + +Requires: python3-cli-exit-tools +Requires: python3-lib-detect-testenv +Requires: python3-multiprocess +Requires: python3-wrapt +Requires: python3-dill +Requires: python3-dill + +%description +Version v1.3.12.2 as of 2022-06-02 see `Changelog`_ +|build_badge| |license| |jupyter| |pypi| |pypi-downloads| |black| +|codecov| |better_code| |cc_maintain| |cc_issues| |cc_coverage| |snyk| +there are many timeout decorators out there - that one focuses on correctness when using with Classes, methods, +class methods, static methods and so on, preserving also the traceback information for Pycharm debugging. +There is also a powerful eval function, it allows to read the desired timeout value even from Class attributes. +It is very flexible and can be used with python >= 3.6, pypy3 and probably other dialects. +There are two timeout strategies implemented, the ubiquitous method using "Signals" and the second using Multiprocessing. +Using "Signals" is slick and lean, but there are nasty caveats, please check section `Caveats using Signals`_ +The default strategy is therefore using Multiprocessing, but You can also use Signals, You have been warned ! +Due to the lack of signals on Windows, or for threaded functions (in a subthread) where signals cant be used, Your only choice is Multiprocessing, +this is set automatically. +Under Windows the decorated function and results needs to be pickable. +For that purpose we use "multiprocess" and "dill" instead of "multiprocessing" and "pickle", in order to be able to use this decorator on more sophisticated objects. + +%package -n python3-wrapt-timeout-decorator +Summary: The better timout decorator +Provides: python-wrapt-timeout-decorator +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-wrapt-timeout-decorator +Version v1.3.12.2 as of 2022-06-02 see `Changelog`_ +|build_badge| |license| |jupyter| |pypi| |pypi-downloads| |black| +|codecov| |better_code| |cc_maintain| |cc_issues| |cc_coverage| |snyk| +there are many timeout decorators out there - that one focuses on correctness when using with Classes, methods, +class methods, static methods and so on, preserving also the traceback information for Pycharm debugging. +There is also a powerful eval function, it allows to read the desired timeout value even from Class attributes. +It is very flexible and can be used with python >= 3.6, pypy3 and probably other dialects. +There are two timeout strategies implemented, the ubiquitous method using "Signals" and the second using Multiprocessing. +Using "Signals" is slick and lean, but there are nasty caveats, please check section `Caveats using Signals`_ +The default strategy is therefore using Multiprocessing, but You can also use Signals, You have been warned ! +Due to the lack of signals on Windows, or for threaded functions (in a subthread) where signals cant be used, Your only choice is Multiprocessing, +this is set automatically. +Under Windows the decorated function and results needs to be pickable. +For that purpose we use "multiprocess" and "dill" instead of "multiprocessing" and "pickle", in order to be able to use this decorator on more sophisticated objects. + +%package help +Summary: Development documents and examples for wrapt-timeout-decorator +Provides: python3-wrapt-timeout-decorator-doc +%description help +Version v1.3.12.2 as of 2022-06-02 see `Changelog`_ +|build_badge| |license| |jupyter| |pypi| |pypi-downloads| |black| +|codecov| |better_code| |cc_maintain| |cc_issues| |cc_coverage| |snyk| +there are many timeout decorators out there - that one focuses on correctness when using with Classes, methods, +class methods, static methods and so on, preserving also the traceback information for Pycharm debugging. +There is also a powerful eval function, it allows to read the desired timeout value even from Class attributes. +It is very flexible and can be used with python >= 3.6, pypy3 and probably other dialects. +There are two timeout strategies implemented, the ubiquitous method using "Signals" and the second using Multiprocessing. +Using "Signals" is slick and lean, but there are nasty caveats, please check section `Caveats using Signals`_ +The default strategy is therefore using Multiprocessing, but You can also use Signals, You have been warned ! +Due to the lack of signals on Windows, or for threaded functions (in a subthread) where signals cant be used, Your only choice is Multiprocessing, +this is set automatically. +Under Windows the decorated function and results needs to be pickable. +For that purpose we use "multiprocess" and "dill" instead of "multiprocessing" and "pickle", in order to be able to use this decorator on more sophisticated objects. + +%prep +%autosetup -n wrapt-timeout-decorator-1.3.12.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-wrapt-timeout-decorator -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.12.2-1 +- Package Spec generated @@ -0,0 +1 @@ +1da6896809262c5cd5f410066d37a272 wrapt_timeout_decorator-1.3.12.2.tar.gz |
