/[packages]/updates/infra_5/python-django16/current/SPECS/python-django16.spec
ViewVC logotype

Contents of /updates/infra_5/python-django16/current/SPECS/python-django16.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1064731 - (show annotations) (download)
Wed Nov 2 13:08:32 2016 UTC (7 years, 4 months ago) by philippem
File size: 3396 byte(s)
update to 1.6.11.5, fix CVE-2016-9013 and CVE-2016-9014  mga#19690, CVE-2016-7401, mga#19464
1 %define module django
2 %define tarname Django
3
4 Summary: A high-level Python Web framework
5 Name: python-%{module}16
6 Version: 1.6.11.5
7 Release: %mkrel 1
8 Source0: https://s3.amazonaws.com/downloads.reviewboard.org/releases/Django/1.6/Django-%{version}.tar.gz
9 # due rename of binary to django1.6-admin, we need to fix bash completion
10 Patch0: python-django-1.6-bash-completion.patch
11
12 License: BSD
13 Group: Development/Python
14 Url: http://www.djangoproject.com
15 BuildArch: noarch
16 BuildRequires: python-setuptools
17 BuildRequires: python-sphinx
18 BuildRequires: python-devel
19 BuildRequires: python-simplejson
20 Requires: python-simplejson
21 Requires: python-pkg-resources
22 # provide compatibility with python-django
23 Provides: python-django = %{version}-%{release}
24 Obsoletes: python-django < 1.6
25 Conflicts: python-django >= 1.7
26
27 %description
28 Django is a high-level Python Web framework that encourages rapid development
29 and clean, pragmatic design.
30
31 Developed and used over the past two years by a fast-moving online-news
32 operation, Django was designed from scratch to handle two challenges: the
33 intensive deadlines of a newsroom and the stringent requirements of experienced
34 Web developers. It has convenient niceties for developing content-management
35 systems, but it's an excellent tool for building any Web site.
36
37 Django focuses on automating as much as possible and adhering to the
38 DRY principle.
39
40 %prep
41 %setup -q -n %{tarname}-%{version}
42 # remove bundled eggs
43 find . -name "*.egg" -exec rm -f '{}' \;
44
45 %patch0 -p1
46
47 # empty files
48 for f in \
49 django/contrib/staticfiles/models.py \
50 django/contrib/webdesign/models.py \
51 django/contrib/humanize/models.py \
52 ; do
53 echo "# just a comment" > $f
54 done
55
56
57 %build
58 %{__python} setup.py build
59
60
61 # build documentation
62 (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html)
63
64 %install
65 %{__python} setup.py install --skip-build --root=%{buildroot}
66
67 # install man pages
68 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
69 cp -p docs/man/* $RPM_BUILD_ROOT%{_mandir}/man1/
70
71 # install bash completion script
72 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/
73 install -m 0644 -p extras/django_bash_completion \
74 $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/
75
76 # Fix items in %%{_bindir}
77 mv $RPM_BUILD_ROOT%{_bindir}/django-admin.py $RPM_BUILD_ROOT%{_bindir}/django-admin
78
79 # remove .po files
80 find $RPM_BUILD_ROOT -name "*.po" | xargs rm -f
81
82 # Renames to not conflict with the main python-django
83 mv $RPM_BUILD_ROOT/%{_bindir}/django-admin $RPM_BUILD_ROOT/%{_bindir}/django1.6-admin
84 mv $RPM_BUILD_ROOT%{_mandir}/man1/daily_cleanup.1 $RPM_BUILD_ROOT%{_mandir}/man1/django1.6-daily_cleanup.1
85 mv $RPM_BUILD_ROOT%{_mandir}/man1/gather_profile_stats.1 $RPM_BUILD_ROOT%{_mandir}/man1/django1.6-gather_profile_stats.1
86 mv $RPM_BUILD_ROOT%{_mandir}/man1/django-admin.1 $RPM_BUILD_ROOT%{_mandir}/man1/django1.6-admin.1
87 mv $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/django_bash_completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/django1.6_bash_completion
88
89
90 %files
91 %doc docs/_build/html/* AUTHORS LICENSE README.rst django/contrib/admin/static/admin/js/LICENSE-JQUERY.txt
92 %{_bindir}/django1.6-admin
93 %{_mandir}/man1/*
94 %dir %{_sysconfdir}/bash_completion.d/
95 %config(noreplace) %{_sysconfdir}/bash_completion.d/django1.6_bash_completion
96 %{python_sitelib}/%{module}
97 %{python_sitelib}/%{tarname}-%{version}-py?.?.egg-info
98

  ViewVC Help
Powered by ViewVC 1.1.30