Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 247204
Collapse All | Expand All

(-)../django-1.0.2.ebuild.old (-15 / +20 lines)
Lines 1-30 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
1
# Copyright 1999-2008 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: $
3
# $Header: $
4
EAPI=2
4
5
5
EAPI="1"
6
inherit bash-completion subversion distutils multilib versionator webapp
6
7
inherit bash-completion distutils multilib versionator webapp
8
7
9
MY_P="${P/#d/D}-final"
8
MY_P="${P/#d/D}-final"
10
WEBAPP_MANUAL_SLOT="yes"
9
WEBAPP_MANUAL_SLOT="yes"
11
10
12
DESCRIPTION="high-level python web framework"
11
DESCRIPTION="High-level python web framework"
13
HOMEPAGE="http://www.djangoproject.com/"
12
HOMEPAGE="http://www.djangoproject.com/"
14
SRC_URI="http://media.djangoproject.com/releases/${PV}/${MY_P}.tar.gz"
13
SRC_URI="http://media.djangoproject.com/releases/${PV}/${MY_P}.tar.gz"
15
LICENSE="BSD"
14
LICENSE="BSD"
16
SLOT="0"
15
SLOT="0"
17
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
16
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
18
IUSE="doc examples mysql postgres sqlite3 test"
17
IUSE="doc examples mysql postgres sqlite3 test"
19
RESTRICT="test"
20
18
21
RDEPEND="dev-python/imaging
19
RDEPEND="dev-python/imaging
22
        sqlite3? ( || (
20
        sqlite3? ( || (
23
                ( dev-python/pysqlite:2 <dev-lang/python-2.5 )
21
                ( dev-python/pysqlite:2 <dev-lang/python-2.5 )
24
                >=dev-lang/python-2.5 ) )
22
                >=dev-lang/python-2.5[sqlite] ) )
25
        test? ( || (
23
        test? ( || (
26
                ( dev-python/pysqlite:2 <dev-lang/python-2.5 )
24
                ( dev-python/pysqlite:2 <dev-lang/python-2.5 )
27
                >=dev-lang/python-2.5 ) )
25
                >=dev-lang/python-2.5[sqlite] ) )
28
        postgres? ( dev-python/psycopg )
26
        postgres? ( dev-python/psycopg )
29
        mysql? ( >=dev-python/mysql-python-1.2.1_p2 )
27
        mysql? ( >=dev-python/mysql-python-1.2.1_p2 )
30
        doc? ( >=dev-python/sphinx-0.3 )"
28
        doc? ( >=dev-python/sphinx-0.3 )"
Lines 34-41 Link Here
34
32
35
DOCS="docs/* AUTHORS"
33
DOCS="docs/* AUTHORS"
36
34
37
src_compile() {
35
src_unpack() {
36
	distutils_src_unpack
37
	if use test; then
38
		local repo_uri
39
		repo_uri="http://code.djangoproject.com/svn/${PN}/tags/releases/${PV}/tests/"
40
		subversion_fetch ${repo_uri} tests
41
	fi
42
}
38
43
44
src_compile() {
39
	distutils_src_compile
45
	distutils_src_compile
40
	if use doc ; then
46
	if use doc ; then
41
		pushd docs
47
		pushd docs
Lines 45-62 Link Here
45
}
51
}
46
52
47
src_test() {
53
src_test() {
48
54
	einfo "Running tests."
49
	cat >> tests/settings.py << __EOF__
55
	cat >> tests/settings.py << __EOF__
50
DATABASE_ENGINE='sqlite3'
56
DATABASE_ENGINE='sqlite3'
51
ROOT_URLCONF='tests/urls.py'
57
ROOT_URLCONF='tests/urls.py'
52
SITE_ID=1
58
SITE_ID=1
53
__EOF__
59
__EOF__
54
	PYTHONPATH="." ${python} tests/runtests.py --settings=settings -v1 ||
60
	PYTHONPATH="." ${python} tests/runtests.py --settings=settings -v1 \
55
		die "tests failed"
61
		|| die "tests failed"
56
}
62
}
57
63
58
src_install() {
64
src_install() {
59
60
	distutils_python_version
65
	distutils_python_version
61
	site_pkgs="$(python_get_sitedir)"
66
	site_pkgs="$(python_get_sitedir)"
62
	export PYTHONPATH="${PYTHONPATH}:${D}/${site_pkgs}"
67
	export PYTHONPATH="${PYTHONPATH}:${D}/${site_pkgs}"
Lines 71-82 Link Here
71
		doins -r examples
76
		doins -r examples
72
	fi
77
	fi
73
	if use doc ; then
78
	if use doc ; then
74
		rm -Rf docs/_build/html/_sources
79
		mv docs/_build/html/{_,.}sources
75
		dohtml txt -r docs/_build/html/*
80
		dohtml txt -r docs/_build/html/*
76
	fi
81
	fi
77
82
78
	insinto "${MY_HTDOCSDIR}"
83
	insinto "${MY_HTDOCSDIR}"
79
	doins -r "${D}"/usr/$(get_libdir)/python2.5/site-packages/django/contrib/admin/media
84
	doins -r "${D}/${site_pkgs}"/django/contrib/admin/media
80
85
81
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
86
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
82
	webapp_src_install
87
	webapp_src_install
Lines 92-98 Link Here
92
	elog "site-packages dir for easy development"
97
	elog "site-packages dir for easy development"
93
	echo
98
	echo
94
	echo
99
	echo
95
	ewarn "If you build Django-1.0.2 without USE="vhosts""
100
	ewarn "If you build Django-1.0.2 without USE=\"vhosts\""
96
	ewarn "webapp-config will automatically install the"
101
	ewarn "webapp-config will automatically install the"
97
	ewarn "admin media into the localhost webroot."
102
	ewarn "admin media into the localhost webroot."
98
}
103
}

Return to bug 247204