%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name cachez %global summary Cache decorator for global or instance level memoize Name: python-%{pypi_name} Version: 0.1.0 Release: 1 Summary: %{summary} License: ASL 2.0 URL: https://pypi.python.org/pypi/cachez Source0: https://pypi.python.org/packages/2d/84/58be622dfe626e722da1f99b0c7143020799c5662ccfe5a38483a5073d5c/cachez-0.1.0.zip BuildArch: noarch %description Cache decorator for global or instance level memoize %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2 BuildRequires: python2-devel %description -n python2-%{pypi_name} Cache decorator for global or instance level memoize %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3 BuildRequires: python3-devel %description -n python3-%{pypi_name} Cache decorator for global or instance level memoize %endif %prep %setup -n %{pypi_name}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check # This does not yet do anything because cachez-0.1.0.zip # does not contain the test file. %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.rst %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.rst %{python3_sitelib}/* %endif %changelog * Wed Feb 01 2017 Eric Harney - 0.1.0-1 - Initial package