%global pypi_name feedgenerator %if 0%{?fedora} > 12 || 0%{?rhel} > 7 %global with_python3 1 %endif %global run_tests 1 Name: python-feedgenerator Version: 1.7 Release: 1%{?dist} Summary: Standalone version of django.utils.feedgenerator License: BSD URL: http://pypi.python.org/pypi/feedgenerator Source0: http://pypi.python.org/packages/source/f/feedgenerator/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-six Requires: pytz %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description Standalone version of DJango's feed generator for generating ATOM and RSS feeds. This is the python 2 build of this module %if 0%{?with_python3} %package -n python3-feedgenerator Summary: Standalone version of django.utils.feedgenerator Requires: python3-six Requires: python3-pytz %description -n python3-feedgenerator Standalone version of DJango's feed generator for generating ATOM and RSS feeds This is the python 3 build of this module %endif %prep %setup -q -n %{pypi_name}-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %check %if 0%{?run_tests} %{__python2} setup.py test # Disabled for now, awaiting response of upstream #%%if 0%{?with_python3} #%%{__python3} setup.py test #%%endif %endif %files %doc README.rst %{python_sitelib}/feedgenerator/ %{python_sitelib}/*.egg-info %if 0%{?with_python3} %files -n python3-feedgenerator %doc README.rst %{python3_sitelib}/feedgenerator/ %{python3_sitelib}/*.egg-info %endif # with_python3 %changelog * Sat Oct 26 2013 Eduardo Echeverria - 1.7-1 - Initial packaging