/[packages]/updates/5/python-django/current/SPECS/python-django.spec
ViewVC logotype

Contents of /updates/5/python-django/current/SPECS/python-django.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 906191 - (show annotations) (download)
Thu Nov 26 10:49:59 2015 UTC (3 years, 11 months ago) by philippem
File size: 4269 byte(s)
update to 1.8.7, security fix for CVE-2015-8213 mga#17215
1 %define module django
2 %define tarname Django
3
4 Summary: A high-level Python Web framework
5 Name: python-%{module}
6 Version: 1.8.7
7 Release: %mkrel 1
8 Source0: https://pypi.python.org/packages/source/D/%{tarname}/%{tarname}-%{version}.tar.gz
9 Patch0: python-django-1.7-py3-admin-completion
10 License: BSD
11 Group: Development/Python
12 Url: http://www.djangoproject.com
13 BuildArch: noarch
14 BuildRequires: python-setuptools
15 BuildRequires: python-sphinx
16 BuildRequires: python-devel
17 BuildRequires: python3-devel
18 BuildRequires: python3-setuptools
19 Requires: %{name}-bash-completion = %{version}-%{release}
20
21 %description
22 Django is a high-level Python Web framework that encourages rapid development
23 and clean, pragmatic design.
24
25 Developed and used over the past two years by a fast-moving online-news
26 operation, Django was designed from scratch to handle two challenges: the
27 intensive deadlines of a newsroom and the stringent requirements of experienced
28 Web developers. It has convenient niceties for developing content-management
29 systems, but it's an excellent tool for building any Web site.
30
31 Django focuses on automating as much as possible and adhering to the
32 DRY principle.
33
34 %package bash-completion
35 Group: Development/Python
36 Summary: bash completion files for Django
37
38
39 %description bash-completion
40 This package contains the bash completion files form Django high-level
41 Python Web framework.
42
43 %package -n python3-%{module}
44 Summary: A high-level Python Web framework
45 Group: Development/Python
46 Requires: %{name}-bash-completion = %{version}-%{release}
47
48 %description -n python3-%{module}
49
50 Django is a high-level Python Web framework that encourages rapid development
51 and clean, pragmatic design.
52
53 Developed and used over the past two years by a fast-moving online-news
54 operation, Django was designed from scratch to handle two challenges: the
55 intensive deadlines of a newsroom and the stringent requirements of experienced
56 Web developers. It has convenient niceties for developing content-management
57 systems, but it's an excellent tool for building any Web site.
58
59 Django focuses on automating as much as possible and adhering to the
60 DRY principle.
61
62 %package doc
63 Summary: Documentation for django
64 Group: Development/Python
65 Provides: python3-%{module}-doc = %{version}-%{release}
66
67 %description doc
68 This package contains documentation for Django,
69 a high-level Python Web framework.
70
71 %prep
72 %setup -q -n %{tarname}-%{version}
73 %patch0
74
75 # empty files
76 for f in \
77 django/contrib/staticfiles/models.py \
78 django/contrib/webdesign/models.py \
79 django/contrib/humanize/models.py \
80 ; do
81 echo "# just a comment" > $f
82 done
83 cp -a . %{py3dir}
84
85 %build
86 %{__python} setup.py build
87 pushd %{py3dir}
88 %{__python3} setup.py build
89 popd
90
91 %install
92 # must do install of python 3 subpackage first, so that we don't
93 # overwrite django-admin script with the python 3 version
94 pushd %{py3dir}
95 %{__python3} setup.py install --skip-build --root %{buildroot}
96 mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/python3-django-admin
97 popd
98
99 %{__python} setup.py install --skip-build --root %{buildroot}
100
101 # build documentation
102 (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html)
103
104
105 # install man pages
106 mkdir -p %{buildroot}%{_mandir}/man1/
107 cp -p docs/man/* %{buildroot}%{_mandir}/man1/
108 cp -a %{buildroot}%{_mandir}/man1/django-admin.1 %{buildroot}%{_mandir}/man1/python3-django-admin.1
109
110 # install bash completion script
111 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
112 install -m 0644 -p extras/django_bash_completion \
113 %{buildroot}%{_sysconfdir}/bash_completion.d/
114
115 # Fix items in %%{_bindir}
116 mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/django-admin
117
118
119 %files
120 %doc AUTHORS LICENSE README.rst
121 %{_mandir}/man1/*
122 # except the python3 prefix
123 %exclude %{_mandir}/man1/python3-*
124 %{_bindir}/django-admin
125 %{python_sitelib}/%{module}
126 %{python_sitelib}/%{tarname}-*.egg-info
127
128 %files -n python3-%{module}
129 %doc AUTHORS LICENSE README.rst
130 %{_mandir}/man1/python3-*
131 %{_bindir}/python3-django-admin
132 %{python3_sitelib}/%{module}
133 %{python3_sitelib}/%{tarname}-*.egg-info
134
135 %files doc
136 %doc docs/_build/html
137
138 %files bash-completion
139 %dir %{_sysconfdir}/bash_completion.d/
140 %config(noreplace) %{_sysconfdir}/bash_completion.d/django_bash_completion
141

  ViewVC Help
Powered by ViewVC 1.1.26