%global modname repoze.lru
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-repoze-lru
Version: 0.4
Release: 14%{?dist}
Summary: A tiny LRU cache implementation and decorator
Group: Development/Libraries
License: BSD
URL: http://pypi.python.org/pypi/repoze.lru
Source0: http://pypi.python.org/packages/source/r/repoze.lru/%{modname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%description
repoze.lru is a LRU (least recently used) cache implementation. Keys and values
that are not used frequently will be evicted from the cache faster than keys
and values that are used frequently.
%if 0%{?with_python3}
%package -n python3-repoze-lru
Summary: A tiny LRU cache implementation and decorator
Group: Development/Libraries
%description -n python3-repoze-lru
repoze.lru is a LRU (least recently used) cache implementation. Keys and values
that are not used frequently will be evicted from the cache faster than keys
and values that are used frequently.
%endif
%prep
%setup -q -n %{modname}-%{version}
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%endif
%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%files
%doc README.txt LICENSE.txt
%{python_sitelib}/repoze/lru
%{python_sitelib}/%{modname}-%{version}*
%if 0%{?with_python3}
%files -n python3-repoze-lru
%doc README.txt LICENSE.txt
%{python3_sitelib}/repoze/lru
%{python3_sitelib}/%{modname}-%{version}*
%endif
%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.4-12
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Fri Dec 06 2013 Pierre-Yves Chibon <pingou@pingoured>fr - 0.4-5
- Change BR from python-setuptools-devel to python-setuptools
See https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Feb 11 2013 Ralph Bean <rbean@redhat.com> - 0.4-3
- Removed clean section.
- Removed defattr.
- Removed removing of buildroot in install section.
- Added removal of egg-info in prep section.
- Added python3 subpackage.
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Mar 13 2012 Luke Macken <lmacken@redhat.com> - 0.4-1
- Update to 0.4
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Jan 2 2010 Luke Macken <lmacken@redhat.com> - 0.3-1
- Initial package