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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 622907 - (show annotations) (download)
Thu May 15 15:58:07 2014 UTC (9 years, 11 months ago) by oden
Original Path: cauldron/python-django/current/SPECS/python-django.spec
File size: 4652 byte(s)
- 1.6.5 (fixes CVE-2014-1418, CVE-2014-3730)

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

  ViewVC Help
Powered by ViewVC 1.1.30