%global pypi_name feedgenerator %global sum Standalone version of Django's feedgenerator module %global commit 6b6572cfd3e7f40993204af5aa70aab443a5b63c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: python-%{pypi_name} Version: 1.9 Release: 9%{?dist} Summary: %{sum} License: BSD URL: https://github.com/getpelican/%{pypi_name} Source0: https://github.com/getpelican/%{pypi_name}/archive/%{commit}/%{pypi_name}-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist six pytz} %description FeedGenerator is a standalone version of Django’s feedgenerator module. It has evolved over time, including an update for Py3K and numerous other enhancements. %package -n python3-%{pypi_name} Summary: %{sum} Requires: %{py3_dist six pytz} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} FeedGenerator is a standalone version of Django’s feedgenerator module. It has evolved over time, including an update for Py3K and numerous other enhancements. %prep %autosetup -n %{pypi_name}-%{commit} rm -rf .tox rm -rf feedgenerator.egg-info rm -rf feedgenerator/django/utils/six.py for f in feedgenerator/django/utils/*py; do sed -i -e 's/from . import six/import six/' -e 's/from .six \(import .*$\)/from six \1/' $f done %build %py3_build %install %py3_install %check %{__python3} setup.py test %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/* %changelog * Fri Jul 26 2019 Fedora Release Engineering - 1.9-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 1.9-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Oct 31 2018 Miro Hrončok - 1.9-7 - Subpackage python2-feedgenerator has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Wed Aug 01 2018 Ankur Sinha - 1.9-6 - Include six and pytz as Requires * Wed Aug 01 2018 Ankur Sinha - 1.9-5 - Remove bundled six * Tue Jul 24 2018 Ankur Sinha - 1.9-4 - Use github tar for the time being * Tue Jul 24 2018 Ankur Sinha - 1.9-3 - Cosmetic improvements * Tue Sep 27 2016 Ankur Sinha - 1.9-2 - Update URL - Update global macro - Update source url - Readd tests * Tue Sep 27 2016 Ankur Sinha - 1.9-1 - Initial rpmbuild