%__openstack_set_env %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without python3 %else %bcond_with python3 %endif Name: python-cachetools Version: 3.1.0 Release: 1%{?dist} Summary: Extensible memoizing collections and decorators License: MIT URL: https://pypi.python.org/pypi/cachetools Source0: https://pypi.python.org/packages/source/c/cachetools/cachetools-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools %if %{with python3} BuildRequires: python3-devel %endif # with python3 %global _description\ This module provides various memoizing collections and decorators,\ including a variant of the Python 3 Standard Library @lru_cache\ function decorator.\ \ This module provides multiple cache implementations based on different\ cache algorithms, as well as decorators for easily memoizing function\ and method calls.\ %description %_description %package -n python2-cachetools Summary: %summary %{?python_provide:%python_provide python2-cachetools} %description -n python2-cachetools %_description %if %{with python3} %package -n python3-cachetools Summary: Extensible memoizing collections and decorators %description -n python3-cachetools This module provides various memoizing collections and decorators, including a variant of the Python 3 Standard Library @lru_cache function decorator. This module provides multiple cache implementations based on different cache algorithms, as well as decorators for easily memoizing function and method calls. %endif # with python3 %prep %setup -qc rm -rf cachetools-%{version}/cachetools.egg-info mv cachetools-%{version} python2 %if %{with python3} cp -a python2 python3 %endif # with python3 %build pushd python2 %{__python2} setup.py build popd %if %{with python3} pushd python3 %{__python3} setup.py build popd %endif # with python3 %install # Must do the python3 install first because the scripts in /usr/bin are # overwritten with every setup.py install (and we want the python2 version # to be the default for now). %if %{with python3} pushd python3 %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif # with python3 pushd python2 %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %check pushd python2 %{__python2} setup.py test popd %if %{with python3} pushd python3 %{__python2} setup.py test popd %endif %files -n python2-cachetools %doc python2/CHANGES.rst python2/PKG-INFO python2/README.rst %license python2/LICENSE # For noarch packages: sitelib %{python2_sitelib}/cachetools %{python2_sitelib}/cachetools-%{version}-py%{python2_version}.egg-info %if %{with python3} %files -n python3-cachetools %doc python3/CHANGES.rst python3/PKG-INFO python3/README.rst %license python3/LICENSE # For noarch packages: sitelib %{python3_sitelib}/cachetools %{python3_sitelib}/cachetools-%{version}-py%{python3_version}.egg-info %endif # with python3 %changelog * Tue Jan 29 2019 John Eckersberg - 3.1.0-1 - New upstream release 3.1.0 (rhbz#1670584) * Fri Jul 13 2018 Fedora Release Engineering - 2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 2.1.0-2 - Rebuilt for Python 3.7 * Mon May 14 2018 John Eckersberg - 2.1.0-1 - New upstream release 2.1.0 (rhbz#1577555) * Sun Feb 11 2018 Iryna Shcherbina - 2.0.1-5 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 2.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jan 03 2018 Lumír Balhar - 2.0.1-3 - Fix directory ownership * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 2.0.1-2 - Python 2 binary package renamed to python2-cachetools See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Sat Aug 12 2017 John Eckersberg - 2.0.1-1 - New upstream release 2.0.1 (rhbz#1480818) * Thu Jul 27 2017 Fedora Release Engineering - 2.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 2.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Dec 21 2016 John Eckersberg - 2.0.0-3 - Use python_version macros for egg-info files * Mon Dec 19 2016 Miro Hrončok - 2.0.0-2 - Rebuild for Python 3.6 * Tue Oct 4 2016 John Eckersberg - 2.0.0-1 - New upstream release 2.0.0 (rhbz#1381392) * Tue Jul 19 2016 Fedora Release Engineering - 1.1.6-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Sun Apr 3 2016 John Eckersberg - 1.1.6-1 - New upstream release 1.1.6 (rhbz#1323394) * Thu Feb 04 2016 Fedora Release Engineering - 1.1.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Nov 11 2015 Fedora Release Engineering - 1.1.5-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Tue Nov 10 2015 Fedora Release Engineering - 1.1.5-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Mon Oct 26 2015 John Eckersberg - 1.1.5-1 - New upstream release 1.1.5 (rhbz#1275112) * Sun Oct 25 2015 John Eckersberg - 1.1.4-1 - New upstream release 1.1.4 (rhbz#1275015) * Wed Sep 16 2015 John Eckersberg - 1.1.3-1 - New upstream release 1.1.3 (rhbz#1263484) * Tue Sep 8 2015 John Eckersberg - 1.1.1-1 - New upstream release 1.1.1 (rhbz#1260808) * Tue Sep 1 2015 John Eckersberg - 1.1.0-1 - New upstream release 1.1.0 (rhbz#1258091) * Tue Jul 21 2015 John Eckersberg - 1.0.3-1 - New upstream release 1.0.3 * Mon Jul 20 2015 John Eckersberg - 1.0.2-2 - Remove egg-info in %%setup - Install license via %%license instead of %%doc - Don't rm -rf $RPM_BUILD_ROOT at the beginning of %%install - Removed defines for __python2, python2_sitelib, and python2_sitearch - Be more explicit in %%files * Fri Jun 19 2015 John Eckersberg - 1.0.2-1 - Initial package