Blob Blame History Raw
%global dotname backports.functools_lru_cache
%global srcname backports-functools_lru_cache
%global sum A backport of functools.lru_cache from Python 3.3 as published at ActiveState

Name:           python-%{srcname}
Version:        1.2.1
Release:        1%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://pypi.python.org/packages/source/b/%{dotname}/%{dotname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python%{python3_pkgversion}-devel
BuildRequires:  python-setuptools python%{python3_pkgversion}-setuptools
BuildRequires:  python2-setuptools_scm python%{python3_pkgversion}-setuptools_scm
BuildRequires:  python2-pytest-runner python3-pytest-runner

%description
%{sum}.

%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
%{sum}.


%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%description -n python%{python3_pkgversion}-%{srcname}
%{sum}.


%prep
%autosetup -n %{dotname}-%{version}


%build
%py2_build
%py3_build


%install
# Must do the python2 install first because the scripts in /usr/bin are
# overwritten with every setup.py install, and in general we want the
# python3 version to be the default.
%py2_install
%py3_install


%check
%{__python2} setup.py test
%{__python3} setup.py test


%files -n python2-%{srcname}
%doc CHANGES.rst README.rst
%{python2_sitelib}/*

%files -n python%{python3_pkgversion}-%{srcname}
%doc CHANGES.rst README.rst
%{python3_sitelib}/


%changelog
* Wed Sep 28 2016 Jon Ciesla <limburgher@gmail.com> - 1.2.1-1
- Initial package.