%global srcname filecache %if 0%{?rhel} == 7 %bcond_without python2 %endif Name: python-%{srcname} Version: 0.77 Release: 1%{?dist} Summary: Decorator for caching python return values to disk License: BSD URL: https://github.com/ubershmekel/filecache Source0: %{pypi_source %{srcname} %{version} zip} BuildArch: noarch %description "filecache" is a decorator that saves the return values of a decorated function to a file. The cache lives even after the interpreter restarts. For example a function which downloads stuff and does heavy duty parsing can benefit from this package. All you need to do is specify how long the return values should be cached (use seconds, like time.sleep). %if 0%{?with_python2} %package -n python2-%{srcname} Summary: Decorator for caching python return values to disk %{?python_provide:%python_provide python2-%{srcname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %description -n python2-%{srcname} "filecache" is a decorator that saves the return values of a decorated function to a file. The cache lives even after the interpreter restarts. For example a function which downloads stuff and does heavy duty parsing can benefit from this package. All you need to do is specify how long the return values should be cached (use seconds, like time.sleep). %endif %package -n python%{python3_pkgversion}-%{srcname} Summary: Decorator for caching python return values to disk %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %description -n python%{python3_pkgversion}-%{srcname} "filecache" is a decorator that saves the return values of a decorated function to a file. The cache lives even after the interpreter restarts. For example a function which downloads stuff and does heavy duty parsing can benefit from this package. All you need to do is specify how long the return values should be cached (use seconds, like time.sleep). %prep %autosetup -n %{srcname}-%{version} %build %if 0%{?with_python2} %py2_build %endif %py3_build %install %if 0%{?with_python2} %py2_install %endif %py3_install %if 0%{?with_python2} %files -n python2-%{srcname} %{python2_sitelib}/%{srcname}-*.egg-info/ %{python2_sitelib}/%{srcname}/ %endif %files -n python%{python3_pkgversion}-%{srcname} %{python3_sitelib}/%{srcname}-*.egg-info/ %{python3_sitelib}/%{srcname}/ %changelog * Tue May 21 2019 Dylan Stephano-Shachter - 0.77-1 - Initial Package