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

(-)south-0.8.1.ebuild (-18 / +16 lines)
Lines 4-10 Link Here
4
4
5
EAPI=5
5
EAPI=5
6
6
7
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
7
PYTHON_COMPAT=( python{2_6,2_7} )
8
8
9
inherit vcs-snapshot distutils-r1
9
inherit vcs-snapshot distutils-r1
10
10
Lines 20-26 Link Here
20
RDEPEND="dev-python/django[${PYTHON_USEDEP}]"
20
RDEPEND="dev-python/django[${PYTHON_USEDEP}]"
21
DEPEND="${RDEPEND}
21
DEPEND="${RDEPEND}
22
	dev-python/setuptools[${PYTHON_USEDEP}]
22
	dev-python/setuptools[${PYTHON_USEDEP}]
23
	doc? ( dev-python/sphinx dev-python/jinja )
23
	doc? (
24
		dev-python/jinja[${PYTHON_USEDEP}]
25
		dev-python/sphinx[${PYTHON_USEDEP}] )
24
	test? ( dev-python/django[sqlite] )"
26
	test? ( dev-python/django[sqlite] )"
25
27
26
# we are setting up the tests, but they fail
28
# we are setting up the tests, but they fail
Lines 31-56 Link Here
31
33
32
python_install_all() {
34
python_install_all() {
33
	use doc && local HTML_DOCS=( docs/_build/html/. )
35
	use doc && local HTML_DOCS=( docs/_build/html/. )
34
}
36
	distutils-r1_python_install_all
35
36
python_compile() {
37
	distutils-r1_python_compile
38
	if use test; then
39
		cd "${BUILD_DIR}"
40
		django-admin.py startproject southtest || die "setting up test env failed"
41
		cd southtest
42
		sed -i \
43
			-e "/^INSTALLED_APPS/a\    'south'," \
44
			-e 's/\(django.db.backends.\)/\1sqlite3/' \
45
			-e "s/\(NAME': '\)/\1test.db/" \
46
			southtest/settings.py || die "sed failed"
47
		echo "SKIP_SOUTH_TESTS=False" >> southtest/settings.py
48
	fi
49
}
37
}
50
38
51
python_test() {
39
python_test() {
52
	# http://south.aeracode.org/ticket/1256
40
	# http://south.aeracode.org/ticket/1256
53
	cd "${BUILD_DIR}/southtest"
41
	cd "${BUILD_DIR}" || die
42
	django-admin.py startproject southtest || die "setting up test env failed"
43
44
	cd southtest || die
45
	sed -i \
46
		-e "/^INSTALLED_APPS/a\    'south'," \
47
		-e 's/\(django.db.backends.\)/\1sqlite3/' \
48
		-e "s/\(NAME': '\)/\1test.db/" \
49
		-e '$a\SKIP_SOUTH_TESTS=False' \
50
		southtest/settings.py || die "test sed failed"
51
54
	"${EPYTHON}" manage.py test south || die "tests failed for ${EPYTHON}"
52
	"${EPYTHON}" manage.py test south || die "tests failed for ${EPYTHON}"
55
}
53
}
56
54

Return to bug 484418