1 |
jlec 15/02/28 18:08:42 |
2 |
|
3 |
Modified: django-1.7.5.ebuild django-9999.ebuild ChangeLog |
4 |
Added: django-1.4.19.ebuild django-1.6.10.ebuild |
5 |
Removed: django-1.7.4.ebuild django-1.7.ebuild |
6 |
Log: |
7 |
Version BUmp and drop old for CVE-2015-{0219,0220,0221,0222}, #536586; add correct dependencies for tests, Use optfeature instead of harddepened on imaging, #473228 |
8 |
|
9 |
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
10 |
|
11 |
Revision Changes Path |
12 |
1.2 dev-python/django/django-1.7.5.ebuild |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.7.5.ebuild?rev=1.2&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.7.5.ebuild?rev=1.2&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.7.5.ebuild?r1=1.1&r2=1.2 |
17 |
|
18 |
Index: django-1.7.5.ebuild |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.5.ebuild,v |
21 |
retrieving revision 1.1 |
22 |
retrieving revision 1.2 |
23 |
diff -u -r1.1 -r1.2 |
24 |
--- django-1.7.5.ebuild 28 Feb 2015 12:59:28 -0000 1.1 |
25 |
+++ django-1.7.5.ebuild 28 Feb 2015 18:08:42 -0000 1.2 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2015 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.5.ebuild,v 1.1 2015/02/28 12:59:28 jlec Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.5.ebuild,v 1.2 2015/02/28 18:08:42 jlec Exp $ |
31 |
|
32 |
EAPI=5 |
33 |
|
34 |
@@ -21,13 +21,23 @@ |
35 |
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
36 |
IUSE="doc sqlite test" |
37 |
|
38 |
-RDEPEND=" |
39 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
40 |
- virtual/python-imaging[${PYTHON_USEDEP}] |
41 |
-" |
42 |
+RDEPEND="" |
43 |
DEPEND="${RDEPEND} |
44 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
45 |
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) |
46 |
- test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" |
47 |
+ test? ( |
48 |
+ ${PYTHON_DEPS//sqlite?/sqlite} |
49 |
+ dev-python/docutils[${PYTHON_USEDEP}] |
50 |
+ dev-python/numpy[$(python_gen_usedep 'python*')] |
51 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
52 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
53 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
54 |
+ )" |
55 |
+ |
56 |
+# dev-python/python-sqlparse[${PYTHON_USEDEP}] |
57 |
+# dev-python/bcrypt[${PYTHON_USEDEP}] |
58 |
+# dev-python/selenium[${PYTHON_USEDEP}] |
59 |
+# sci-libs/gdal[geos,${PYTHON_USEDEP}] |
60 |
|
61 |
S="${WORKDIR}/${MY_P}" |
62 |
|
63 |
@@ -49,15 +59,13 @@ |
64 |
} |
65 |
|
66 |
python_compile_all() { |
67 |
- if use doc; then |
68 |
- emake -C docs html |
69 |
- fi |
70 |
+ use doc && emake -C docs html |
71 |
} |
72 |
|
73 |
python_test() { |
74 |
# Tests have non-standard assumptions about PYTHONPATH, |
75 |
# and don't work with ${BUILD_DIR}/lib. |
76 |
- PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ |
77 |
+ PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ |
78 |
|| die "Tests fail with ${EPYTHON}" |
79 |
} |
80 |
|
81 |
@@ -67,8 +75,11 @@ |
82 |
|
83 |
elog "Additional Backend support can be enabled via" |
84 |
optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python |
85 |
- optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python |
86 |
+ optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysqlcient |
87 |
optfeature "PostgreSQL backend support" dev-python/psycopg:2 |
88 |
+ optfeature "GEO Django" sci-libs/gdal[geos] |
89 |
+ optfeature "Memcached support" dev-python/python-memcached |
90 |
+ optfeature "ImageField Support" virtual/python-imaging |
91 |
echo "" |
92 |
} |
93 |
|
94 |
@@ -77,7 +88,7 @@ |
95 |
bashcomp_alias ${PN}-admin django-admin.py |
96 |
|
97 |
if use doc; then |
98 |
- rm -fr docs/_build/html/_sources |
99 |
+ rm -fr docs/_build/html/_sources || die |
100 |
local HTML_DOCS=( docs/_build/html/. ) |
101 |
fi |
102 |
|
103 |
|
104 |
|
105 |
|
106 |
1.24 dev-python/django/django-9999.ebuild |
107 |
|
108 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-9999.ebuild?rev=1.24&view=markup |
109 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-9999.ebuild?rev=1.24&content-type=text/plain |
110 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-9999.ebuild?r1=1.23&r2=1.24 |
111 |
|
112 |
Index: django-9999.ebuild |
113 |
=================================================================== |
114 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v |
115 |
retrieving revision 1.23 |
116 |
retrieving revision 1.24 |
117 |
diff -u -r1.23 -r1.24 |
118 |
--- django-9999.ebuild 9 Sep 2014 05:27:31 -0000 1.23 |
119 |
+++ django-9999.ebuild 28 Feb 2015 18:08:42 -0000 1.24 |
120 |
@@ -1,48 +1,65 @@ |
121 |
-# Copyright 1999-2014 Gentoo Foundation |
122 |
+# Copyright 1999-2015 Gentoo Foundation |
123 |
# Distributed under the terms of the GNU General Public License v2 |
124 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v 1.23 2014/09/09 05:27:31 idella4 Exp $ |
125 |
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v 1.24 2015/02/28 18:08:42 jlec Exp $ |
126 |
|
127 |
EAPI=5 |
128 |
-PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) |
129 |
+ |
130 |
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) |
131 |
PYTHON_REQ_USE='sqlite?' |
132 |
WEBAPP_NO_AUTO_INSTALL="yes" |
133 |
|
134 |
-#if LIVE |
135 |
-inherit git-2 |
136 |
-EGIT_REPO_URI="git://github.com/django/django.git |
137 |
- https://github.com/django/django.git" |
138 |
-#endif |
139 |
- |
140 |
-inherit bash-completion-r1 distutils-r1 versionator webapp |
141 |
- |
142 |
-MY_P="Django-${PV}" |
143 |
+inherit bash-completion-r1 distutils-r1 eutils git-r3 versionator webapp |
144 |
|
145 |
DESCRIPTION="High-level Python web framework" |
146 |
HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" |
147 |
-SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" |
148 |
+SRC_URI="" |
149 |
+EGIT_REPO_URI=" |
150 |
+ git://github.com/django/django.git |
151 |
+ https://github.com/django/django.git |
152 |
+ " |
153 |
|
154 |
LICENSE="BSD" |
155 |
SLOT="0" |
156 |
-KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
157 |
-IUSE="doc mysql postgres sqlite test" |
158 |
+KEYWORDS="" |
159 |
+IUSE="doc sqlite test" |
160 |
|
161 |
-PY2_USEDEP=$(python_gen_usedep 'python2*') |
162 |
-RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}] |
163 |
- postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) |
164 |
- mysql? ( >=dev-python/mysql-python-1.2.3[${PY2_USEDEP}] )" |
165 |
+RDEPEND="" |
166 |
DEPEND="${RDEPEND} |
167 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
168 |
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) |
169 |
- test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" |
170 |
- |
171 |
-#if LIVE |
172 |
-SRC_URI= |
173 |
-KEYWORDS= |
174 |
-#endif |
175 |
+ test? ( |
176 |
+ ${PYTHON_DEPS//sqlite?/sqlite} |
177 |
+ dev-python/bcrypt[${PYTHON_USEDEP}] |
178 |
+ dev-python/docutils[${PYTHON_USEDEP}] |
179 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
180 |
+ dev-python/numpy[$(python_gen_usedep 'python*')] |
181 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
182 |
+ dev-python/python-sqlparse[${PYTHON_USEDEP}] |
183 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
184 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
185 |
+ dev-python/selenium[${PYTHON_USEDEP}] |
186 |
+ sci-libs/gdal[geos,${PYTHON_USEDEP}] |
187 |
+ )" |
188 |
|
189 |
S="${WORKDIR}/${MY_P}" |
190 |
|
191 |
WEBAPP_MANUAL_SLOT="yes" |
192 |
|
193 |
+PATCHES=( |
194 |
+ "${FILESDIR}"/${PN}-1.7.5-bashcomp.patch |
195 |
+) |
196 |
+ |
197 |
+pkg_setup() { |
198 |
+ webapp_pkg_setup |
199 |
+} |
200 |
+ |
201 |
+python_prepare_all() { |
202 |
+ # Prevent d'loading in the doc build |
203 |
+ sed -e '/^ "sphinx.ext.intersphinx",/d' -i docs/conf.py || die |
204 |
+ |
205 |
+ distutils-r1_python_prepare_all |
206 |
+} |
207 |
+ |
208 |
python_compile_all() { |
209 |
use doc && emake -C docs html |
210 |
} |
211 |
@@ -50,33 +67,36 @@ |
212 |
python_test() { |
213 |
# Tests have non-standard assumptions about PYTHONPATH, |
214 |
# and don't work with ${BUILD_DIR}/lib. |
215 |
- PYTHONPATH=. \ |
216 |
- "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ |
217 |
+ PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ |
218 |
|| die "Tests fail with ${EPYTHON}" |
219 |
} |
220 |
|
221 |
-src_test() { |
222 |
- # Port conflict in django.test.testcases.LiveServerTestCase. |
223 |
- # Several other races with temp files. |
224 |
- DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test |
225 |
-} |
226 |
- |
227 |
src_install() { |
228 |
distutils-r1_src_install |
229 |
webapp_src_install |
230 |
+ |
231 |
+ elog "Additional Backend support can be enabled via" |
232 |
+ optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python |
233 |
+ optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysqlcient |
234 |
+ optfeature "PostgreSQL backend support" dev-python/psycopg:2 |
235 |
+ optfeature "GEO Django" sci-libs/gdal[geos] |
236 |
+ optfeature "Memcached support" dev-python/python-memcached |
237 |
+ optfeature "ImageField Support" virtual/python-imaging |
238 |
+ echo "" |
239 |
} |
240 |
|
241 |
python_install_all() { |
242 |
- distutils-r1_python_install_all |
243 |
- newbashcomp extras/django_bash_completion ${PN} |
244 |
+ newbashcomp extras/django_bash_completion ${PN}-admin |
245 |
+ bashcomp_alias ${PN}-admin django-admin.py |
246 |
|
247 |
if use doc; then |
248 |
- rm -fr docs/_build/html/_sources |
249 |
- dohtml -A txt -r docs/_build/html/. |
250 |
+ rm -fr docs/_build/html/_sources || die |
251 |
+ local HTML_DOCS=( docs/_build/html/. ) |
252 |
fi |
253 |
|
254 |
insinto "${MY_HTDOCSDIR#${EPREFIX}}" |
255 |
doins -r django/contrib/admin/static/admin/. |
256 |
+ distutils-r1_python_install_all |
257 |
} |
258 |
|
259 |
pkg_postinst() { |
260 |
|
261 |
|
262 |
|
263 |
1.152 dev-python/django/ChangeLog |
264 |
|
265 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/ChangeLog?rev=1.152&view=markup |
266 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/ChangeLog?rev=1.152&content-type=text/plain |
267 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/ChangeLog?r1=1.151&r2=1.152 |
268 |
|
269 |
Index: ChangeLog |
270 |
=================================================================== |
271 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v |
272 |
retrieving revision 1.151 |
273 |
retrieving revision 1.152 |
274 |
diff -u -r1.151 -r1.152 |
275 |
--- ChangeLog 28 Feb 2015 12:59:28 -0000 1.151 |
276 |
+++ ChangeLog 28 Feb 2015 18:08:42 -0000 1.152 |
277 |
@@ -1,6 +1,18 @@ |
278 |
# ChangeLog for dev-python/django |
279 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
280 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.151 2015/02/28 12:59:28 jlec Exp $ |
281 |
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.152 2015/02/28 18:08:42 jlec Exp $ |
282 |
+ |
283 |
+*django-1.4.19 (28 Feb 2015) |
284 |
+*django-1.6.10 (28 Feb 2015) |
285 |
+ |
286 |
+ 28 Feb 2015; Justin Lecher <jlec@g.o> +django-1.4.19.ebuild, |
287 |
+ +django-1.6.10.ebuild, +files/django-1.4.19-bashcomp.patch, |
288 |
+ +files/django-1.4.19-test.patch, +files/django-1.6.10-bashcomp.patch, |
289 |
+ +files/django-1.6.10-test.patch, -django-1.7.4.ebuild, -django-1.7.ebuild, |
290 |
+ django-1.7.5.ebuild, django-9999.ebuild: |
291 |
+ Version BUmp and drop old for CVE-2015-{0219,0220,0221,0222}, #536586; add |
292 |
+ correct dependencies for tests, Use optfeature instead of harddepened on |
293 |
+ imaging, #473228 |
294 |
|
295 |
*django-1.7.5 (28 Feb 2015) |
296 |
|
297 |
|
298 |
|
299 |
|
300 |
1.1 dev-python/django/django-1.4.19.ebuild |
301 |
|
302 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.4.19.ebuild?rev=1.1&view=markup |
303 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.4.19.ebuild?rev=1.1&content-type=text/plain |
304 |
|
305 |
Index: django-1.4.19.ebuild |
306 |
=================================================================== |
307 |
# Copyright 1999-2015 Gentoo Foundation |
308 |
# Distributed under the terms of the GNU General Public License v2 |
309 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.4.19.ebuild,v 1.1 2015/02/28 18:08:42 jlec Exp $ |
310 |
|
311 |
EAPI=5 |
312 |
|
313 |
PYTHON_COMPAT=( python2_7 ) |
314 |
PYTHON_REQ_USE='sqlite?' |
315 |
|
316 |
inherit bash-completion-r1 distutils-r1 eutils versionator webapp |
317 |
|
318 |
MY_P="Django-${PV}" |
319 |
|
320 |
DESCRIPTION="High-level Python web framework" |
321 |
HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" |
322 |
SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" |
323 |
|
324 |
LICENSE="BSD" |
325 |
SLOT="0" |
326 |
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
327 |
IUSE="sqlite test" |
328 |
|
329 |
RDEPEND="" |
330 |
DEPEND="${RDEPEND} |
331 |
dev-python/setuptools[${PYTHON_USEDEP}] |
332 |
test? ( |
333 |
${PYTHON_DEPS//sqlite?/sqlite} |
334 |
dev-python/docutils[${PYTHON_USEDEP}] |
335 |
<dev-python/numpy-1.9[$(python_gen_usedep 'python*')] |
336 |
dev-python/pillow[${PYTHON_USEDEP}] |
337 |
dev-python/pytz[${PYTHON_USEDEP}] |
338 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
339 |
virtual/python-imaging[${PYTHON_USEDEP}] |
340 |
)" |
341 |
|
342 |
# app-text/pytextile[${PYTHON_USEDEP}] |
343 |
# dev-python/markdown[${PYTHON_USEDEP}] |
344 |
# dev-python/selenium[${PYTHON_USEDEP}] |
345 |
# dev-python/py-bcrypt[${PYTHON_USEDEP}] |
346 |
|
347 |
S="${WORKDIR}/${MY_P}" |
348 |
|
349 |
WEBAPP_MANUAL_SLOT="yes" |
350 |
|
351 |
PATCHES=( |
352 |
"${FILESDIR}"/${P}-bashcomp.patch |
353 |
"${FILESDIR}"/${P}-test.patch |
354 |
) |
355 |
|
356 |
python_prepare_all() { |
357 |
# Disable tests requiring network connection. |
358 |
sed \ |
359 |
-e "s/test_correct_url_value_passes/_&/" \ |
360 |
-e "s/test_correct_url_with_redirect/_&/" \ |
361 |
-i tests/modeltests/validation/tests.py || die |
362 |
sed \ |
363 |
-e "s/test_urlfield_3/_&/" \ |
364 |
-e "s/test_urlfield_4/_&/" \ |
365 |
-e "s/test_urlfield_10/_&/" \ |
366 |
-i tests/regressiontests/forms/tests/fields.py || die |
367 |
|
368 |
distutils-r1_python_prepare_all |
369 |
} |
370 |
|
371 |
python_test() { |
372 |
# Tests have non-standard assumptions about PYTHONPATH, |
373 |
# and don't work with ${BUILD_DIR}/lib. |
374 |
PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ |
375 |
|| die "Tests fail with ${EPYTHON}" |
376 |
} |
377 |
|
378 |
src_install() { |
379 |
distutils-r1_src_install |
380 |
webapp_src_install |
381 |
|
382 |
elog "Additional Backend support can be enabled via" |
383 |
optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python |
384 |
optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python |
385 |
optfeature "PostgreSQL backend support" dev-python/psycopg:2 |
386 |
optfeature "Memcached support" python-memcached |
387 |
optfeature "ImageField Support" virtual/python-imaging |
388 |
echo "" |
389 |
} |
390 |
|
391 |
python_install_all() { |
392 |
newbashcomp extras/django_bash_completion ${PN}-admin |
393 |
bashcomp_alias ${PN}-admin django-admin.py |
394 |
|
395 |
insinto "${MY_HTDOCSDIR#${EPREFIX}}" |
396 |
doins -r django/contrib/admin/static/admin/. |
397 |
distutils-r1_python_install_all |
398 |
} |
399 |
|
400 |
pkg_postinst() { |
401 |
elog "A copy of the admin media is available to" |
402 |
elog "webapp-config for installation in a webroot," |
403 |
elog "as well as the traditional location in python's" |
404 |
elog "site-packages dir for easy development" |
405 |
elog |
406 |
ewarn "If you build Django ${PV} without USE=\"vhosts\"" |
407 |
|
408 |
# XXX: call webapp_pkg_postinst? the old ebuild didn't do that... |
409 |
ewarn "webapp-config will automatically install the" |
410 |
ewarn "admin media into the localhost webroot." |
411 |
} |
412 |
|
413 |
|
414 |
|
415 |
1.1 dev-python/django/django-1.6.10.ebuild |
416 |
|
417 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.6.10.ebuild?rev=1.1&view=markup |
418 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/django-1.6.10.ebuild?rev=1.1&content-type=text/plain |
419 |
|
420 |
Index: django-1.6.10.ebuild |
421 |
=================================================================== |
422 |
# Copyright 1999-2015 Gentoo Foundation |
423 |
# Distributed under the terms of the GNU General Public License v2 |
424 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.6.10.ebuild,v 1.1 2015/02/28 18:08:42 jlec Exp $ |
425 |
|
426 |
EAPI=5 |
427 |
|
428 |
PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) |
429 |
PYTHON_COMPAT=( python2_7 ) |
430 |
PYTHON_REQ_USE='sqlite?' |
431 |
WEBAPP_NO_AUTO_INSTALL="yes" |
432 |
|
433 |
inherit bash-completion-r1 distutils-r1 eutils versionator webapp |
434 |
|
435 |
MY_P="Django-${PV}" |
436 |
|
437 |
DESCRIPTION="High-level Python web framework" |
438 |
HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" |
439 |
SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" |
440 |
|
441 |
LICENSE="BSD" |
442 |
SLOT="0" |
443 |
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
444 |
IUSE="doc sqlite test" |
445 |
|
446 |
RDEPEND="" |
447 |
DEPEND="${RDEPEND} |
448 |
dev-python/setuptools[${PYTHON_USEDEP}] |
449 |
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) |
450 |
test? ( |
451 |
${PYTHON_DEPS//sqlite?/sqlite} |
452 |
dev-python/docutils[${PYTHON_USEDEP}] |
453 |
<dev-python/numpy-1.9[$(python_gen_usedep 'python*')] |
454 |
dev-python/pillow[${PYTHON_USEDEP}] |
455 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
456 |
dev-python/pytz[${PYTHON_USEDEP}] |
457 |
)" |
458 |
|
459 |
# dev-python/bcrypt[${PYTHON_USEDEP}] |
460 |
# dev-python/selenium[${PYTHON_USEDEP}] |
461 |
|
462 |
S="${WORKDIR}/${MY_P}" |
463 |
|
464 |
WEBAPP_MANUAL_SLOT="yes" |
465 |
|
466 |
PATCHES=( |
467 |
"${FILESDIR}"/${PN}-1.5-py3tests.patch |
468 |
"${FILESDIR}"/${PN}-1.6-objects.patch |
469 |
"${FILESDIR}"/${P}-bashcomp.patch |
470 |
"${FILESDIR}"/${P}-test.patch |
471 |
) |
472 |
|
473 |
pkg_setup() { |
474 |
webapp_pkg_setup |
475 |
} |
476 |
|
477 |
python_prepare_all() { |
478 |
# Disable tests requiring network connection. |
479 |
sed \ |
480 |
-e "s:test_sensitive_cookie_not_cached:_&:g" \ |
481 |
-i tests/cache/tests.py || die |
482 |
|
483 |
distutils-r1_python_prepare_all |
484 |
} |
485 |
python_compile_all() { |
486 |
use doc && emake -C docs html |
487 |
} |
488 |
|
489 |
python_test() { |
490 |
# Tests have non-standard assumptions about PYTHONPATH, |
491 |
# and don't work with ${BUILD_DIR}/lib. |
492 |
PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ |
493 |
|| die "Tests fail with ${EPYTHON}" |
494 |
} |
495 |
|
496 |
src_install() { |
497 |
distutils-r1_src_install |
498 |
webapp_src_install |
499 |
|
500 |
elog "Additional Backend support can be enabled via" |
501 |
optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python |
502 |
optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python |
503 |
optfeature "PostgreSQL backend support" dev-python/psycopg:2 |
504 |
optfeature "Memcached support" python-memcached |
505 |
optfeature "ImageField Support" virtual/python-imaging |
506 |
echo "" |
507 |
} |
508 |
|
509 |
python_install_all() { |
510 |
newbashcomp extras/django_bash_completion ${PN}-admin |
511 |
bashcomp_alias ${PN}-admin django-admin.py |
512 |
|
513 |
if use doc; then |
514 |
rm -fr docs/_build/html/_sources || die |
515 |
local HTML_DOCS=( docs/_build/html/. ) |
516 |
fi |
517 |
|
518 |
insinto "${MY_HTDOCSDIR#${EPREFIX}}" |
519 |
doins -r django/contrib/admin/static/admin/. |
520 |
distutils-r1_python_install_all |
521 |
} |
522 |
|
523 |
pkg_postinst() { |
524 |
elog "A copy of the admin media is available to webapp-config for installation in a" |
525 |
elog "webroot, as well as the traditional location in python's site-packages dir" |
526 |
elog "for easy development." |
527 |
webapp_pkg_postinst |
528 |
} |