Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%endif

Name:           python-django-debug-toolbar
Version:        1.4
Release:        7%{?dist}
Summary:        Configurable set of panels that display various debug information

License:        BSD
URL:            https://github.com/django-debug-toolbar/django-debug-toolbar
Source0:        http://pypi.python.org/packages/source/d/django-debug-toolbar/django-debug-toolbar-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-sqlparse
BuildRequires:  python-django
Requires:       python-django
Requires:       python-sqlparse

%description
The Django Debug Toolbar is a configurable set of panels that display various
debug information about the current request/response and when clicked, display 
more details about the panel's content.

Currently, the following panels have been written and are working:

 -   Django version
 -   Request timer
 -   A list of settings in settings.py
 -   Common HTTP headers
 -   GET/POST/cookie/session variable display
 -   Templates and context used, and their template paths
 -   SQL queries including time to execute and links to EXPLAIN each query
 -   List of signals, their args and receivers
 -   Logging output via Python's built-in logging, or via the logbook module

%if 0%{?with_python3} > 0
%package -n python3-django-debug-toolbar
Requires:      python3-django
Requires:      python3-sqlparse
BuildRequires: python3-django
BuildRequires: python3-sqlparse
BuildRequires: python3-setuptools
BuildRequires: python3-devel

Summary:       Configurable set of panels that display various debug information

%description -n python3-django-debug-toolbar
The Django Debug Toolbar is a configurable set of panels that display various
debug information about the current request/response and when clicked, display 
more details about the panel's content.

Currently, the following panels have been written and are working:

 -   Django version
 -   Request timer
 -   A list of settings in settings.py
 -   Common HTTP headers
 -   GET/POST/cookie/session variable display
 -   Templates and context used, and their template paths
 -   SQL queries including time to execute and links to EXPLAIN each query
 -   List of signals, their args and receivers
 -   Logging output via Python's built-in logging, or via the logbook module

%endif

%prep
%autosetup -n django-debug-toolbar-%{version}

# "Fix" zero length file error
echo "# empty file" > debug_toolbar/models.py

%build
%py2_build

%if 0%{?with_python3} > 0
%py3_build
%endif # with_python3

%install
%py2_install

%if 0%{?with_python3}
%py3_install
%endif # with_python3


%check
%{__python2} setup.py test

%if 0%{?with_python3} > 0
# unfortunately, tests still fail
# %{__python3} setup.py test
%endif # with_python3

%files
%doc README.rst PKG-INFO
%license LICENSE
%{python2_sitelib}/debug_toolbar
%{python2_sitelib}/django_debug_toolbar-%{version}-py%{python_version}.egg-info

%if 0%{?with_python3} > 0
%files -n python3-django-debug-toolbar
%doc README.rst PKG-INFO
%license LICENSE
%{python3_sitelib}/debug_toolbar
%{python3_sitelib}/django_debug_toolbar-%{version}-py%{python3_version}.egg-info
%endif

%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

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

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

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

* Sat May 21 2016 Matthias Runge <mrunge@redhat.com> - 1.4-3
- modernize specfile
- enable python3 (rhbz#1311523)

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

* Thu Dec 10 2015 Matthias Runge <mrunge@redhat.com> - 1.4-1
- update to 1.4 and add requirement to python-sqlparse (rhbz#1287269)

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

* Fri Mar 13 2015 Matthias Runge <mrunge@redhat.com> - 1.3.0-1
- update to 1.3.0
- modernize spec, add python3 support

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

* Tue Jan 07 2014 Matthias Runge <mrunge@redhat.com> - 1.0.1-1
- update to 1.0.1 (rhbz#1049249)

* Thu Jan 02 2014 Matthias Runge <mrunge@redhat.com> - 1.0-1
- update to version 1.0 (rhbz#1023925)

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

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

* Mon Aug 06 2012 Matthias Runge <mrunge@matthias-runge.de> - 0.9.4-1
- update to upstream version 0.9.4

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Mar 23 2012 Matthias Runge <mrunge@matthias-runge.de> 0.9.3-2
- change requirement from Django to python-django

* Mon Jan 23 2012 Matthias Runge <mrunge@matthias-runge.de> 0.9.3-1
- initial packaging