%global pypi_name django-robots
%global obs_ver 0.8.0-3
Name: python-%{pypi_name}
Version: 2.0
Release: 3%{?dist}
Summary: Robots exclusion application for Django, complementing Sitemaps
Group: Development/Languages
License: BSD
URL: http://pypi.python.org/pypi/%{pypi_name}
Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: gettext
%description
Django application to manage robots.txt files following the robots exclusion
protocol, complementing the Django Sitemap contrib app.
%package -n python2-%{pypi_name}
Summary: Robots exclusion application for Django - Python 2 version
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: gettext
Requires: python2-django
Provides: %{pypi_name} = %{version}-%{release}
Obsoletes: %{pypi_name} < %{obs_ver}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
Django application to manage robots.txt files following the robots exclusion
protocol, complementing the Django Sitemap contrib app.
This package provides Python 2 build of %{pypi_name}.
%package -n python3-%{pypi_name}
Summary: Robots exclusion application for Django - Python 3 version
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-django
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
Django application to manage robots.txt files following the robots exclusion
protocol, complementing the Django Sitemap contrib app.
This package provides Python 3 build of %{pypi_name}.
%prep
%autosetup -n %{pypi_name}-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
rm -rf %{buildroot}%{python2_sitelib}/tests
rm -rf %{buildroot}%{python3_sitelib}/tests
# Language files; not under /usr/share, need to be handled manually
(cd %{buildroot} && find .%{python2_sitelib} -name 'django.?o') | sed -e 's|^.||' | sed -e \
's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
>> python2-%{pypi_name}.lang
(cd %{buildroot} && find .%{python3_sitelib} -name 'django.?o') | sed -e 's|^.||' | sed -e \
's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
>> python3-%{pypi_name}.lang
%files -f python2-%{pypi_name}.lang -n python2-%{pypi_name}
%doc README.rst docs/
%license LICENSE.txt
# list some files explicitly to avoid listing locale files twice
%dir %{python2_sitelib}/robots
%{python2_sitelib}/robots/*.py*
%{python2_sitelib}/robots/migrations
%{python2_sitelib}/robots/south_migrations
%dir %{python2_sitelib}/robots/templates/
%dir %{python2_sitelib}/robots/templates/robots
%{python2_sitelib}/robots/templates/robots/rule_list.html
%{python2_sitelib}/django_robots*.egg-info
%files -f python3-%{pypi_name}.lang -n python3-%{pypi_name}
%doc README.rst docs/
%license LICENSE.txt
# list some files explicitly to avoid listing locale files twice
%dir %{python3_sitelib}/robots
%{python3_sitelib}/robots/*.py
%{python3_sitelib}/robots/__pycache__
%{python3_sitelib}/robots/migrations
%{python3_sitelib}/robots/south_migrations
%dir %{python3_sitelib}/robots/templates/
%dir %{python3_sitelib}/robots/templates/robots
%{python3_sitelib}/robots/templates/robots/rule_list.html
%{python3_sitelib}/django_robots*.egg-info
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2.0-2
- Rebuild for Python 3.6
* Thu Jul 21 2016 Matthias Runge <mrunge@redhat.com> - 2.0-1
- porting the specfile to Python 3, thanks to Jan Beran <jberan@redhat.com>
- major spec file cleanup
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Mar 23 2012 Matthias Runge <mrunge@matthias-runge.de> - 0.8.1-2
- renamed to python-django-robots
- SPEC cleanup
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Apr 14 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 0.8.0-1
- initial spec