%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name cachez Name: python-%{pypi_name} Version: 0.1.0 Release: 2%{?dist} Summary: Cache decorator for global or instance level memoize License: ASL 2.0 URL: https://pypi.python.org/pypi/cachez Source0: https://pypi.io/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.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}} 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}} 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-2 - Initial package