2013-12-04 13:48:43 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-Django
|
|
|
|
#
|
2017-03-17 15:05:33 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-12-04 13:48:43 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-05-09 17:59:50 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-01-19 11:46:11 +01:00
|
|
|
%define skip_python2 1
|
2013-12-04 13:48:43 +01:00
|
|
|
Name: python-Django
|
2018-01-19 11:46:11 +01:00
|
|
|
Version: 2.0
|
2013-12-04 13:48:43 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A high-level Python Web framework
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: http://www.djangoproject.com
|
2018-01-19 11:46:11 +01:00
|
|
|
Source: https://www.djangoproject.com/m/releases/2.0/Django-%{version}.tar.gz
|
2015-07-14 17:43:44 +02:00
|
|
|
Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt#/Django-%{version}.tar.gz.asc
|
|
|
|
Source2: %{name}.keyring
|
2014-10-09 12:52:23 +02:00
|
|
|
Source99: python-Django-rpmlintrc
|
2017-05-09 17:59:50 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-08-14 12:38:18 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2017-05-09 17:59:50 +02:00
|
|
|
Requires: python-Pillow
|
2017-08-14 12:38:18 +02:00
|
|
|
Requires: python-pytz
|
2015-11-11 10:31:32 +01:00
|
|
|
Requires: python-setuptools
|
2013-12-04 13:48:43 +01:00
|
|
|
Requires: python-xml
|
2017-08-14 12:38:18 +02:00
|
|
|
Recommends: python-bcrypt
|
2017-05-09 17:59:50 +02:00
|
|
|
Provides: python3-django = %{version}
|
|
|
|
Obsoletes: python3-django < %{version}
|
|
|
|
Provides: python3-South = %{version}
|
|
|
|
Obsoletes: python3-South < %{version}
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2013-12-04 13:48:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_subpackages
|
2013-12-04 13:48:43 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
|
|
|
|
|
|
|
|
%prep
|
2015-07-14 17:43:44 +02:00
|
|
|
# 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
|
|
|
|
|
2013-12-04 13:48:43 +01:00
|
|
|
%setup -q -n Django-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_build
|
2013-12-04 13:48:43 +01:00
|
|
|
|
|
|
|
%install
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_install
|
2014-10-09 12:52:23 +02:00
|
|
|
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/django-admin.py
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/django-admin
|
2014-02-26 06:55:11 +01:00
|
|
|
|
2017-07-30 11:19:59 +02:00
|
|
|
%{python_expand install -D -m 0644 extras/django_bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/django_bash_completion-%{$python_bin_suffix}.sh
|
2017-05-09 17:59:50 +02:00
|
|
|
pushd %{buildroot}%{$python_sitelib}
|
2017-09-25 13:54:05 +02:00
|
|
|
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
|
2017-07-30 11:19:59 +02:00
|
|
|
# Fix wrong-script-interpreter
|
2017-09-25 13:54:05 +02:00
|
|
|
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
|
2017-07-30 11:19:59 +02:00
|
|
|
%fdupes .
|
|
|
|
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
2017-08-14 12:38:18 +02:00
|
|
|
$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/
|
2017-05-09 17:59:50 +02:00
|
|
|
$python -m compileall -d %{$python_sitelib} django/conf/locale/
|
2017-07-30 11:19:59 +02:00
|
|
|
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/
|
2017-05-09 17:59:50 +02:00
|
|
|
$python -m compileall -d %{$python_sitelib} django/conf/locale/ru/
|
2017-07-30 11:19:59 +02:00
|
|
|
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/ru/
|
2017-09-25 13:54:05 +02:00
|
|
|
%fdupes django/bin/
|
2017-05-09 17:59:50 +02:00
|
|
|
popd
|
|
|
|
}
|
2013-12-04 13:48:43 +01:00
|
|
|
|
|
|
|
%post
|
2017-05-09 17:59:50 +02:00
|
|
|
%{python_install_alternative django-admin.py django-admin}
|
2013-12-04 13:48:43 +01:00
|
|
|
|
|
|
|
%preun
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_uninstall_alternative django-admin
|
2013-12-04 13:48:43 +01:00
|
|
|
|
2017-05-09 17:59:50 +02:00
|
|
|
%files %{python_files}
|
2013-12-04 13:48:43 +01:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS LICENSE README.rst
|
2017-05-09 17:59:50 +02:00
|
|
|
%python_alternative %{_bindir}/django-admin
|
|
|
|
%python_alternative %{_bindir}/django-admin.py
|
|
|
|
%{_sysconfdir}/bash_completion.d/django_bash_completion-%{python_bin_suffix}.sh
|
2013-12-04 13:48:43 +01:00
|
|
|
%{python_sitelib}/django
|
2017-05-09 17:59:50 +02:00
|
|
|
%{python_sitelib}/Django-%{version}-py*.egg-info
|
2013-12-04 13:48:43 +01:00
|
|
|
|
|
|
|
%changelog
|