60dc7ed
%if 0%{?fedora}
60dc7ed
%global with_python3 1
60dc7ed
%endif
60dc7ed
60dc7ed
%global pypi_name cachez
60dc7ed
60dc7ed
Name:           python-%{pypi_name}
930754e
Version:        0.1.2
0782160
Release:        4%{?dist}
60dc7ed
Summary:        Cache decorator for global or instance level memoize
60dc7ed
60dc7ed
License:        ASL 2.0
60dc7ed
URL:            https://pypi.python.org/pypi/cachez
930754e
Source0:        https://pypi.io/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
60dc7ed
BuildArch:      noarch
60dc7ed
60dc7ed
%description
60dc7ed
Cache decorator for global or instance level memoize.
60dc7ed
60dc7ed
%package -n python2-%{pypi_name}
60dc7ed
Summary:        %{summary}
60dc7ed
%{?python_provide:%python_provide python2-%{pypi_name}}
60dc7ed
60dc7ed
BuildRequires:  python2-devel
f5bffce
BuildRequires:  python2-setuptools
f5bffce
BuildRequires:  python2-hamcrest
f5bffce
BuildRequires:  python2-pytest
60dc7ed
60dc7ed
%description -n python2-%{pypi_name}
60dc7ed
Cache decorator for global or instance level memoize.
60dc7ed
60dc7ed
%if 0%{?with_python3}
60dc7ed
%package -n python3-%{pypi_name}
60dc7ed
Summary:        %{summary}
60dc7ed
%{?python_provide:%python_provide python3-%{pypi_name}}
60dc7ed
60dc7ed
BuildRequires:  python3-devel
94f75e1
BuildRequires:  python3-hamcrest
94f75e1
BuildRequires:  python3-pytest
60dc7ed
60dc7ed
%description -n python3-%{pypi_name}
60dc7ed
Cache decorator for global or instance level memoize.
60dc7ed
60dc7ed
%endif
60dc7ed
60dc7ed
%prep
60dc7ed
%setup -n %{pypi_name}-%{version}
60dc7ed
60dc7ed
%build
60dc7ed
%py2_build
60dc7ed
60dc7ed
%if 0%{?with_python3}
60dc7ed
%py3_build
60dc7ed
%endif
60dc7ed
60dc7ed
%install
60dc7ed
%py2_install
60dc7ed
60dc7ed
%if 0%{?with_python3}
60dc7ed
%py3_install
60dc7ed
%endif
60dc7ed
60dc7ed
%check
94f75e1
py.test-2 cachez_test.py
94f75e1
%if 0%{?with_python3}
94f75e1
py.test-3 cachez_test.py
94f75e1
%endif
60dc7ed
60dc7ed
%files -n python2-%{pypi_name}
60dc7ed
%license LICENSE.txt
60dc7ed
%doc README.rst
60dc7ed
%{python2_sitelib}/*
60dc7ed
60dc7ed
%if 0%{?with_python3}
60dc7ed
%files -n python3-%{pypi_name}
60dc7ed
%license LICENSE.txt
60dc7ed
%doc README.rst
60dc7ed
%{python3_sitelib}/*
60dc7ed
%endif
60dc7ed
60dc7ed
%changelog
0782160
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-4
0782160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0782160
f5bffce
* Tue Jan 16 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.2-3
f5bffce
- Update Python 2 dependency declarations to new packaging standards
f5bffce
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
f5bffce
9fcdf63
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
9fcdf63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9fcdf63
930754e
* Tue May 16 2017 Eric Harney <eharney@redhat.com> - 0.1.2-1
930754e
- Update to 0.1.2
930754e
94f75e1
* Fri Feb 10 2017 Eric Harney <eharney@redhat.com> - 0.1.1-1
94f75e1
- Update to 0.1.1
94f75e1
- Run unit tests
94f75e1
60dc7ed
* Wed Feb 01 2017 Eric Harney <eharney@redhat.com> - 0.1.0-2
60dc7ed
- Initial package