diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 15:32:11 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 15:32:11 +0000 |
| commit | f7c08842a1b5934a6a3ba9793a8a7fece494dc11 (patch) | |
| tree | 0398a1ca53851f94571c09fa1a05cf8fab072eb7 | |
| parent | 9ff22afdffb16f4df5f960e066608c3c6d1340b2 (diff) | |
automatic import of python-temporal-cacheopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-temporal-cache.spec | 268 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 270 insertions, 0 deletions
@@ -0,0 +1 @@ +/temporal-cache-0.1.4.tar.gz diff --git a/python-temporal-cache.spec b/python-temporal-cache.spec new file mode 100644 index 0000000..fcd62c1 --- /dev/null +++ b/python-temporal-cache.spec @@ -0,0 +1,268 @@ +%global _empty_manifest_terminate_build 0 +Name: python-temporal-cache +Version: 0.1.4 +Release: 1 +Summary: Time based function caching +License: Apache 2.0 +URL: https://github.com/timkpaine/temporal-cache +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0f/6c/792cc73744d87d49e343f47cf552bffd3ebfb9019a37c68e7fe4a4c66c4d/temporal-cache-0.1.4.tar.gz +BuildArch: noarch + +Requires: python3-frozendict +Requires: python3-tzlocal +Requires: python3-black +Requires: python3-bump2version +Requires: python3-flake8 +Requires: python3-flake8-black +Requires: python3-mock +Requires: python3-pytest +Requires: python3-pytest-cov +Requires: python3-Sphinx +Requires: python3-sphinx-markdown-builder +Requires: python3-frozendict +Requires: python3-tzlocal + +%description +# temporal-cache + +Time-based cache invalidation + +[](https://github.com/timkpaine/temporal-cache/actions?query=workflow%3A%22Build+Status%22) +[](https://codecov.io/gh/timkpaine/temporal-cache) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://temporal-cache.readthedocs.io) + + +## Install + +From pip + +`pip install temporal-cache` + +Or from source + +`python setup.py install` + +## Why? + +I needed something that would automagically refresh at 4:00pm when markets close. + +```python3 + + @expire(hour=16) + def fetchFinancialData(): + +``` + +## Interval Cache + +The interval cache expires every `time` interval since its first use + +```python3 + + @interval(seconds=5, minutes=2) + def myfoo(): + '''myfoo's lru_cache will expire 2 minutes, 5 seconds after last use''' +``` + + +## Expire Cache + +The expire cache expires on the time given, in scheduler/cron style. + +```python3 + + @expire(second=5, minute=2) + def myfoo(): + '''myfoo's lru_cache will expire on the second minute, fifth second of every hour, every day, etc''' +``` + + +## Caveats + +Python hashing symantics persist. Dicts will be frozen, lists will be converted to tuples. Users are advised to pre-freeze to avoid issues. + + + + +%package -n python3-temporal-cache +Summary: Time based function caching +Provides: python-temporal-cache +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-temporal-cache +# temporal-cache + +Time-based cache invalidation + +[](https://github.com/timkpaine/temporal-cache/actions?query=workflow%3A%22Build+Status%22) +[](https://codecov.io/gh/timkpaine/temporal-cache) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://temporal-cache.readthedocs.io) + + +## Install + +From pip + +`pip install temporal-cache` + +Or from source + +`python setup.py install` + +## Why? + +I needed something that would automagically refresh at 4:00pm when markets close. + +```python3 + + @expire(hour=16) + def fetchFinancialData(): + +``` + +## Interval Cache + +The interval cache expires every `time` interval since its first use + +```python3 + + @interval(seconds=5, minutes=2) + def myfoo(): + '''myfoo's lru_cache will expire 2 minutes, 5 seconds after last use''' +``` + + +## Expire Cache + +The expire cache expires on the time given, in scheduler/cron style. + +```python3 + + @expire(second=5, minute=2) + def myfoo(): + '''myfoo's lru_cache will expire on the second minute, fifth second of every hour, every day, etc''' +``` + + +## Caveats + +Python hashing symantics persist. Dicts will be frozen, lists will be converted to tuples. Users are advised to pre-freeze to avoid issues. + + + + +%package help +Summary: Development documents and examples for temporal-cache +Provides: python3-temporal-cache-doc +%description help +# temporal-cache + +Time-based cache invalidation + +[](https://github.com/timkpaine/temporal-cache/actions?query=workflow%3A%22Build+Status%22) +[](https://codecov.io/gh/timkpaine/temporal-cache) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://pypi.python.org/pypi/temporal-cache/) +[](https://temporal-cache.readthedocs.io) + + +## Install + +From pip + +`pip install temporal-cache` + +Or from source + +`python setup.py install` + +## Why? + +I needed something that would automagically refresh at 4:00pm when markets close. + +```python3 + + @expire(hour=16) + def fetchFinancialData(): + +``` + +## Interval Cache + +The interval cache expires every `time` interval since its first use + +```python3 + + @interval(seconds=5, minutes=2) + def myfoo(): + '''myfoo's lru_cache will expire 2 minutes, 5 seconds after last use''' +``` + + +## Expire Cache + +The expire cache expires on the time given, in scheduler/cron style. + +```python3 + + @expire(second=5, minute=2) + def myfoo(): + '''myfoo's lru_cache will expire on the second minute, fifth second of every hour, every day, etc''' +``` + + +## Caveats + +Python hashing symantics persist. Dicts will be frozen, lists will be converted to tuples. Users are advised to pre-freeze to avoid issues. + + + + +%prep +%autosetup -n temporal-cache-0.1.4 + +%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-temporal-cache -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.4-1 +- Package Spec generated @@ -0,0 +1 @@ +2c2e129f90e57fd64a411f99264742d3 temporal-cache-0.1.4.tar.gz |
