/[gentoo-x86]/dev-python/django/django-9999.ebuild
Gentoo

Contents of /dev-python/django/django-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (show annotations) (download)
Sun Jun 2 04:22:26 2013 UTC (2 weeks, 3 days ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +6 -11 lines
Cleanup webapp.eclass usage.

(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v 1.21 2013/06/01 19:35:37 floppym Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
7 PYTHON_REQ_USE='sqlite?'
8 WEBAPP_NO_AUTO_INSTALL="yes"
9
10 #if LIVE
11 inherit git-2
12 EGIT_REPO_URI="git://github.com/django/django.git
13 https://github.com/django/django.git"
14 #endif
15
16 inherit bash-completion-r1 distutils-r1 versionator webapp
17
18 MY_P="Django-${PV}"
19
20 DESCRIPTION="High-level Python web framework"
21 HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django"
22 SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz"
23
24 LICENSE="BSD"
25 SLOT="0"
26 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
27 IUSE="doc mysql postgres sqlite test"
28
29 PY2_USEDEP=$(python_gen_usedep 'python2*')
30 RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}]
31 postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
32 mysql? ( >=dev-python/mysql-python-1.2.3[${PY2_USEDEP}] )"
33 DEPEND="${RDEPEND}
34 doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
35 test? ( ${PYTHON_DEPS//sqlite?/sqlite} )"
36
37 #if LIVE
38 SRC_URI=
39 KEYWORDS=
40 #endif
41
42 S="${WORKDIR}/${MY_P}"
43
44 WEBAPP_MANUAL_SLOT="yes"
45
46 python_compile_all() {
47 use doc && emake -C docs html
48 }
49
50 python_test() {
51 # Tests have non-standard assumptions about PYTHONPATH,
52 # and don't work with ${BUILD_DIR}/lib.
53 PYTHONPATH=. \
54 "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \
55 || die "Tests fail with ${EPYTHON}"
56 }
57
58 src_test() {
59 # Port conflict in django.test.testcases.LiveServerTestCase.
60 # Several other races with temp files.
61 DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
62 }
63
64 src_install() {
65 distutils-r1_src_install
66 webapp_src_install
67 }
68
69 python_install_all() {
70 distutils-r1_python_install_all
71 newbashcomp extras/django_bash_completion ${PN}
72
73 if use doc; then
74 rm -fr docs/_build/html/_sources
75 dohtml -A txt -r docs/_build/html/.
76 fi
77
78 insinto "${MY_HTDOCSDIR#${EPREFIX}}"
79 doins -r django/contrib/admin/static/admin/.
80 }
81
82 pkg_postinst() {
83 elog "A copy of the admin media is available to webapp-config for installation in a"
84 elog "webroot, as well as the traditional location in python's site-packages dir"
85 elog "for easy development."
86 webapp_pkg_postinst
87 }

  ViewVC Help
Powered by ViewVC 1.1.20