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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Jul 31 12:36:06 2012 UTC (2 years, 2 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 xarthisius 1.3 # Copyright 1999-2012 Gentoo Foundation
2 arfrever 1.1 # Distributed under the terms of the GNU General Public License v2
3 ago 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.1.4.ebuild,v 1.3 2012/05/28 19:38:23 xarthisius Exp $
4 arfrever 1.1
5     EAPI="3"
6     PYTHON_DEPEND="2"
7     SUPPORT_PYTHON_ABIS="1"
8     RESTRICT_PYTHON_ABIS="3.*"
9    
10     inherit bash-completion distutils versionator webapp
11    
12     MY_P="Django-${PV}"
13    
14     DESCRIPTION="High-level Python web framework"
15     HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django"
16     SRC_URI="http://media.djangoproject.com/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz"
17    
18     LICENSE="BSD"
19     SLOT="0"
20     KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
21     IUSE="examples mysql postgres sqlite test"
22    
23     RDEPEND="dev-python/imaging
24     sqlite? ( || ( dev-lang/python:2.7[sqlite] dev-lang/python:2.6[sqlite] dev-lang/python:2.5[sqlite] dev-python/pysqlite:2 ) )
25     postgres? ( dev-python/psycopg )
26     mysql? ( >=dev-python/mysql-python-1.2.1_p2 )"
27     DEPEND="${RDEPEND}
28     test? ( || ( dev-lang/python:2.7[sqlite] dev-lang/python:2.6[sqlite] dev-lang/python:2.5[sqlite] dev-python/pysqlite:2 ) )"
29    
30     S="${WORKDIR}/${MY_P}"
31    
32     WEBAPP_MANUAL_SLOT="yes"
33    
34     pkg_setup() {
35     python_pkg_setup
36     webapp_pkg_setup
37     }
38    
39     src_test() {
40     testing() {
41     cat >> tests/settings.py << __EOF__
42     DATABASE_ENGINE='sqlite3'
43     DATABASE_NAME='test.db'
44     ROOT_URLCONF='tests/urls.py'
45     SITE_ID=1
46     __EOF__
47     # Tests have non-standard assumptions about PYTHONPATH and
48     # don't work with usual "build-${PYTHON_ABI}/lib".
49     PYTHONPATH="." "$(PYTHON)" tests/runtests.py --settings=settings -v1
50     }
51     python_execute_function testing
52     }
53    
54     src_install() {
55     distutils_src_install
56    
57     dobashcompletion extras/django_bash_completion
58    
59     if use examples; then
60     insinto /usr/share/doc/${PF}
61     doins -r examples
62     fi
63    
64     insinto "${MY_HTDOCSDIR#${EPREFIX}}"
65     doins -r django/contrib/admin/media/* || die "doins failed"
66    
67     webapp_src_install
68     }
69    
70     pkg_preinst() {
71     :
72     }
73    
74     pkg_postinst() {
75     bash-completion_pkg_postinst
76     distutils_pkg_postinst
77    
78     einfo "Now, Django has the best of both worlds with Gentoo,"
79     einfo "ease of deployment for production and development."
80     echo
81     elog "A copy of the admin media is available to"
82     elog "webapp-config for installation in a webroot,"
83     elog "as well as the traditional location in python's"
84     elog "site-packages dir for easy development"
85     echo
86     ewarn "If you build Django ${PV} without USE=\"vhosts\""
87     ewarn "webapp-config will automatically install the"
88     ewarn "admin media into the localhost webroot."
89     }

  ViewVC Help
Powered by ViewVC 1.1.20