%global pkgname django-contact-form
%global obs_ver 0.3-8
%if 0%{?fedora} > 0
%global with_python3 1
%endif
Name: python-django-contact-form
Version: 1.1
Release: 3%{?dist}
Summary: An extensible contact-form application for Django
Group: Development/Languages
License: BSD
URL: http://bitbucket.org/ubernostrum/django-contact-form/
Source0: https://pypi.python.org/packages/source/d/%{pkgname}/%{pkgname}-%{version}.tar.gz
BuildArch: noarch
Provides: %{pkgname} = %{version}-%{release}
Obsoletes: %{pkgname} < %{obs_ver}
%description
An extensible contact-form application for Django
%package -n python2-%{pkgname}
Summary: An extensible contact-form application for Django
BuildRequires: python2-devel
Requires: python-django
Obsoletes: python-%{pkgname} < 1.1-1
%{?python_provide:%python_provide python2-%{pkgname}}
%description -n python2-%{pkgname}
An extensible contact-form application for Django
%if 0%{?with_python3}
%package -n python3-%{pkgname}
Summary: An extensible contact-form application for Django
BuildRequires: python3-devel
Requires: python3-django
%{?python_provide:%python_provide python3-%{pkgname}}
%description -n python3-%{pkgname}
An extensible contact-form application for Django
%endif
%prep
%setup -q -n %{pkgname}-%{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
%install
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif
%files -n python2-%{pkgname}
%doc LICENSE README.rst docs/
%{python2_sitelib}/contact_form
%{python2_sitelib}/django_contact_form-%{version}-py%{python_version}.egg-info
%if 0%{?with_python3}
%files -n python3-%{pkgname}
%doc LICENSE README.rst docs/
%{python3_sitelib}/contact_form
%{python3_sitelib}/django_contact_form-%{version}-py%{python3_version}.egg-info
%endif
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Nov 26 2015 Matthias Runge <mrunge@redhat.com> - 1.1-1
- update to 1.1
- provide python3 subpackage
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Nov 17 2014 Matthias Runge <mrunge@redhat.com> - 1.0-1
- update to 1.0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-12.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-11.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-10.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-9.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Apr 25 2012 Matthias Runge <mrunge@matthias-runge.de> - 0.3-8.hg97559a887345
- package renamed to python-django-contact-form
- minor spec cleanup
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-7.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-6.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-5.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4.hg97559a887345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Mar 10 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.3-3.hg97559a887345
- Update to a newer release from hg
* Mon Mar 02 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.3-2
- Add Requires: Django
* Wed Feb 18 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.3-1
- Initial RPM release