1
0
forked from pool/python-Django
python-Django/python-Django.spec
Dominique Leuenberger aaf262f20c Accepting request 588436 from devel:languages:python
- update to 2.0.3 (bsc#1083305, bsc#1083304, CVE-2018-7536, CVE-2018-7537):
  * Fixed #29108 -- Fixed crash in aggregation of distinct+ordered+sliced querysets.
  * Added CVE-2018-6188 to the security release archive.
  * Post-release version bump.
  * Updated translations from Transifex
  * Added stub release notes for security releases.
  * Fixed incorrect regex in re_path() example.
  * Fixed #29125 -- Made Q.deconstruct() deterministic with multiple keyword arguments.
  * Fixed #29126 -- Doc'd the behavior of QuerySet.update_or_create() with manually specified pks.
  * Used a CSS positioning in tutorial 6 that doesn't differ across browsers.
  * Fixed typo in bulk_create() documentation.
  * Fixed #29176 -- Fixed AbstractBaseUser.normalize_username() crash if username isn't a string.
  * Removed blank lines per isort 4.3.0.
  * Added stub release notes for 2.0.3.
  * Fixed CVE-2018-7536 -- Fixed catastrophic backtracking in urlize and urlizetrunc template filters.
  * Fixed #29172 -- Fixed crash with Window expression in a subquery.
  * Fixed #29166 -- Fixed crash in When() expression with a list argument.
  * Fixed #24270 -- Doc'd that django_bash_completion is only in the source distribution.
  * Improved clarity of docs/topics/install.txt.
  * Refs #29125 -- Made Q.deconstruct() omit 'query_utils' in the path and _connector='AND' since it's a default value.
  * Fixed CVE-2018-7537 -- Fixed catastrophic backtracking in django.utils.text.Truncator.
  * Bumped version for 2.0.3 release.
  * Corrected doc'd type of some parameters from string to str.
  * Fixed #29146 -- Readded ^ and $ inadvertently removed from re_path() examples.
  * Fixed #29107 -- Doc'd that ModelForm doesn't actually inherit from Form.
  * Switched test requirement to new psycopg2-binary package.
  * Added backticks around obj argument in admin docs.
  * Fixed typo in docs/topics/forms/media.txt.
  * Fixed #29109 -- Fixed the admin time picker widget for the Thai locale.
  * Fixed #29118 -- Fixed crash with QuerySet.order_by(Exists(...)).

OBS-URL: https://build.opensuse.org/request/show/588436
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Django?expand=0&rev=37
2018-03-26 09:52:04 +00:00

108 lines
4.2 KiB
RPMSpec

#
# spec file for package python-Django
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-Django
Version: 2.0.3
Release: 0
Summary: A high-level Python Web framework
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://www.djangoproject.com
Source: https://www.djangoproject.com/m/releases/2.0/Django-%{version}.tar.gz
Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt#/Django-%{version}.tar.gz.asc
Source2: %{name}.keyring
Source99: python-Django-rpmlintrc
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Pillow
Requires: python-pytz
Requires: python-setuptools
Requires: python-xml
Recommends: python-bcrypt
Provides: python3-django = %{version}
Obsoletes: python3-django < %{version}
Provides: python3-South = %{version}
Obsoletes: python3-South < %{version}
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
%prep
# The publisher doesn't sign the source tarball, but a signatures file containing multiple hashes.
# Verify hashes in that file against source tarball.
echo "`grep -e '^[0-9a-f]\{32\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-32` %{SOURCE0}" | md5sum -c
echo "`grep -e '^[0-9a-f]\{40\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-40` %{SOURCE0}" | sha1sum -c
echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-64` %{SOURCE0}" | sha256sum -c
%setup -q -n Django-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/django-admin.py
%python_clone -a %{buildroot}%{_bindir}/django-admin
%{python_expand install -D -m 0644 extras/django_bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/django_bash_completion-%{$python_bin_suffix}.sh
pushd %{buildroot}%{$python_sitelib}
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
# Fix wrong-script-interpreter
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" django/bin/django-admin.py
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" django/conf/project_template/manage.py-tpl
%fdupes .
# Deduplicating files can generate a RPMLINT warning for pyc mtime
$python -m compileall -d %{$python_sitelib} django/bin/
$python -O -m compileall -d %{$python_sitelib} django/bin/
$python -m compileall -d %{$python_sitelib} django/conf/project_template/
$python -O -m compileall -d %{$python_sitelib} django/conf/project_template/
$python -m compileall -d %{$python_sitelib} django/conf/locale/
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/
$python -m compileall -d %{$python_sitelib} django/conf/locale/ru/
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/ru/
%fdupes django/bin/
popd
}
%post
%{python_install_alternative django-admin.py django-admin}
%preun
%python_uninstall_alternative django-admin
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.rst
%python_alternative %{_bindir}/django-admin
%python_alternative %{_bindir}/django-admin.py
%{_sysconfdir}/bash_completion.d/django_bash_completion-%{python_bin_suffix}.sh
%{python_sitelib}/django
%{python_sitelib}/Django-%{version}-py*.egg-info
%changelog