Blob Blame History Raw
%global pypi_name django-filter
%global obs_ver 0.5.0-6

# Disable the python3 build on EPEL-7 due to missing packages
%global with_python3 0

Name:           python-%{pypi_name}
Version:        1.0.2
Release:        1%{?dist}
Summary:        A Django application for allowing users to filter queryset dynamically

Group:          Development/Languages
License:        BSD
URL:            https://github.com/carltongibson/django-filter
Source0:        https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-django
BuildRequires:  python-mock
BuildRequires:  python-setuptools
BuildRequires:  python-django-rest-framework
Requires:       python-django
Requires:       python-django-rest-framework

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-django
BuildRequires:  python3-mock
BuildRequires:  python3-setuptools
BuildRequires:  python3-django-rest-framework
%endif

Provides:       django-filter = %{version}-%{release}
Obsoletes:      django-filter < %{obs_ver}

%if 0%{?with_python3}
%package -n python3-django-filter
Summary:        A Django application for allowing users to filter queryset dynamically
Requires:       python3-django
Requires:       python3-django-rest-framework

%description -n python3-django-filter
Django-filter is a reusable Django application for allowing users to filter
querysets dynamically. This is a Python 3 build of django-filter.
%endif

%description
Django-filter is a reusable Django application for allowing users to filter
querysets dynamically.

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif

%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%check
%{__python} runtests.py

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} runtests.py
popd
%endif

%files
%doc CHANGES.rst README.rst LICENSE docs/
%{python_sitelib}/django_filters
%{python_sitelib}/django_filter-%{version}-py?.?.egg-info

%if 0%{?with_python3}
%files -n python3-django-filter
%doc CHANGES.rst README.rst LICENSE docs/
%{python3_sitelib}/django_filters
%{python3_sitelib}/django_filter-%{version}-py?.?.egg-info
%endif

%changelog
* Fri Dec 08 2017 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-1
- Update to 1.0.2 (#1523407)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Jan 12 2017 Adam Williamson <awilliam@redhat.com> - 1.0.1-1
- Update to latest release (Django 1.10-compatible)
- Update dependencies

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com>
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Fri Jun 19 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.10.0-1
- Update to 0.10.0
- Introduce python3 subpackage

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Apr 10 2014 Luis Bazan <lbazan@fedoraproject.org> - 0.7-2
- change dependecy 

* Thu Apr 10 2014 Luis Bazan <lbazan@fedoraproject.org> - 0.7-1
- New Upstream Version

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Apr 16 2013 Miro Hrončok <mhroncok@redhat.com> - 0.6-1
- New version compatible with Django 1.5
- Using runtests.py instead of creating own test suite
- Added BR python-django-discover-runner
- Filenames in %%docs changed
- Removed patches for Django 1.4
- Added BR python-mock >=1 (3 tests are failing with older mock)

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Aug 15 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.5.3-1
- Renamed to python-django-filter.
- Updated to version 0.5.3.

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Thu Aug 20 2009 Diego Búrigo Zacarão <diegobz@gmail.com> 0.5.0-1
- Initial RPM release