%if 0%{?fedora} > 12 %global with_python3 1 %else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif Name: python-feedgenerator Version: 1.5 Release: 2%{?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/feedgenerator-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel, python-setuptools Requires: python-six, pytz %if 0%{?with_python3} BuildRequires: python3-devel, python3-setuptools %endif %description Standalone version of DJango's feed generator for generating ATOM and RSS feeds. %if 0%{?with_python3} %package -n python3-feedgenerator Requires: python3, python3-six, python3-pytz Summary: Standalone version of django.utils.feedgenerator %description -n python3-feedgenerator Standalone version of DJango's feed generator for generating ATOM and RSS feeds. %endif %prep %setup -q -n feedgenerator-%{version} %if 0%{?with_python3} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT popd %endif # with_python3 %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 * Fri Jan 30 2013 Konstantin Ryabitsev - 1.5-2 - Build python3 version - Require python2-devel and python3-devel, accordingly - Require pytz * Wed Jan 30 2013 Konstantin Ryabitsev - 1.5-1 - Update to 1.5 * Mon Jan 28 2013 Konstantin Ryabitsev - 1.2.1-1 - Initial packaging