1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 SUPPORT_PYTHON_ABIS="1"
9 RESTRICT_PYTHON_ABIS="2.5 3.*"
13 DESCRIPTION="Intelligent schema migrations for Django apps."
14 HOMEPAGE="http://south.aeracode.org/"
15 SRC_URI="https://bitbucket.org/andrewgodwin/south/get/${PV}.tar.gz -> ${P}.tar.gz"
22 RDEPEND="dev-python/django"
25 doc? ( dev-python/sphinx dev-python/jinja )"
27 # we are setting up the tests, but they fail
32 mv "${WORKDIR}"/*-south-* "${S}"
38 use doc && emake -C docs html
44 use doc && dohtml -r docs/_build/html/*
48 distutils_pkg_postinst
49 elog "In order to use the south schema migrations for your Django project,"
50 elog "just add 'south' to your INSTALLED_APPS in the settings.py file."
51 elog "manage.py will now automagically offer the new functions."
56 mkdir -p "${T}/test-${PYTHON_ABI}"
57 cd "${T}/test-${PYTHON_ABI}"
59 django-admin.py-${PYTHON_ABI} startproject southtest || die "setting up test env failed"
62 -e "/^INSTALLED_APPS/a\ 'south'," \
63 -e 's/\(django.db.backends.\)/\1sqlite3/' \
64 -e "s/\(NAME': '\)/\1test.db/" \
65 southtest/settings.py || die "sed failed"
66 echo "SKIP_SOUTH_TESTS=False" >> southtest/settings.py
67 PYTHONPATH="${S}/build-${PYTHON_ABI}/lib:${S}/south/tests" "$(PYTHON)" manage.py test south || die "tests failed"
69 python_execute_function testing