diff options
author | Ian Delaney <idella4@gentoo.org> | 2013-06-03 07:08:29 +0000 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2013-06-03 07:08:29 +0000 |
commit | 26c4546e3855cfae3961e3e95685775aa7794f77 (patch) | |
tree | e2295aeab26708f9dbcb87a8bd01ca1d323fb47c /dev-python/django-tastypie | |
parent | Bump (diff) | |
download | gentoo-2-26c4546e3855cfae3961e3e95685775aa7794f77.tar.gz gentoo-2-26c4546e3855cfae3961e3e95685775aa7794f77.tar.bz2 gentoo-2-26c4546e3855cfae3961e3e95685775aa7794f77.zip |
Added needed deps, tarball from pypi substituted with 'proper' one from home site, patch for running testsuite to die on fail (shifts code from ebuild back to run script), test phase reduced to run on 1 line
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python/django-tastypie')
-rw-r--r-- | dev-python/django-tastypie/django-tastypie-0.9.15.ebuild | 39 | ||||
-rw-r--r-- | dev-python/django-tastypie/files/runtests.patch | 46 |
2 files changed, 62 insertions, 23 deletions
diff --git a/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild b/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild index 2a8ee077c16f..97f000ce794e 100644 --- a/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild +++ b/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild,v 1.2 2013/05/30 21:16:59 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild,v 1.3 2013/06/03 07:08:29 idella4 Exp $ EAPI=5 PYTHON_COMPAT=( python{2_6,2_7} ) @@ -9,7 +9,8 @@ inherit distutils-r1 DESCRIPTION="A flexible and capable API layer for django utilising serialisers" HOMEPAGE="http://pypi.python.org/pypi/django-tastypie/ https://github.com/toastdriven/django-tastypie" -SRC_URI="https://github.com/toastdriven/django-tastypie/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/toastdriven/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" IUSE="bip doc digest lxml oauth test yaml" @@ -17,12 +18,14 @@ LICENSE="BSD" SLOT="0" RDEPEND=">=dev-python/mimeparse-0.1.3[${PYTHON_USEDEP}] - >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}] - !=dev-python/python-dateutil-2.0 - dev-python/django[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}] + >=dev-python/django-1.3[${PYTHON_USEDEP}] + dev-python/pyxml[${PYTHON_USEDEP}] + dev-python/defusedxml[${PYTHON_USEDEP}] bip? ( dev-python/biplist[${PYTHON_USEDEP}] ) digest? ( dev-python/python-digest[${PYTHON_USEDEP}] ) - oauth? ( dev-python/oauth2[${PYTHON_USEDEP}] dev-python/django-oauth-plus[${PYTHON_USEDEP}] ) + oauth? ( dev-python/oauth2[${PYTHON_USEDEP}] + dev-python/django-oauth-plus[${PYTHON_USEDEP}] ) lxml? ( dev-python/lxml[${PYTHON_USEDEP}] ) yaml? ( dev-python/pyyaml[${PYTHON_USEDEP}] )" DEPEND="${RDEPEND} @@ -37,10 +40,13 @@ DEPEND="${RDEPEND} >=dev-python/mimeparse-0.1.3[${PYTHON_USEDEP}] >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] - ) -" + )" -RESTRICT="test" +python_prepare_all() { + # skip run tests script + use test && epatch "${FILESDIR}"/runtests.patch + distutils-r1_python_prepare_all +} python_compile_all() { use doc && emake -C docs html @@ -51,20 +57,7 @@ src_test() { } python_test() { - # See tests/run_all_tests.sh - local types=( core basic alphanumeric slashless namespaced related - validation gis content_gfk authorization ) - local failed type - - pushd tests > /dev/null || die - for type in "${types[@]}"; do - set -- django-admin.py test ${type} --settings=settings_${type} - echo "$@" - "$@" || failed=1 - done - popd > /dev/null || die - - [[ -z ${failed} ]] || die "Testing failed with ${EPYTHON}" + PYTHONPATH=.:tests ./tests/run_all_tests.sh } python_install_all() { diff --git a/dev-python/django-tastypie/files/runtests.patch b/dev-python/django-tastypie/files/runtests.patch new file mode 100644 index 000000000000..384bdef07b38 --- /dev/null +++ b/dev-python/django-tastypie/files/runtests.patch @@ -0,0 +1,46 @@ +The run tests bash script keeps going on a fail. Patch corrects this for gentoo +diff -ur django-tastypie-0.9.15.oirg/tests/run_all_tests.sh django-tastypie-0.9.15/tests/run_all_tests.sh +--- tests/run_all_tests.sh 2013-05-03 10:36:43.000000000 +0800 ++++ tests/run_all_tests.sh 2013-06-03 13:55:18.633474126 +0800 +@@ -10,9 +10,9 @@ + + #Don't run customuser tests if django's version is less than 1.5. + if [ $major -lt '2' -a $minor -lt '5' ]; then +- ALL="core basic alphanumeric slashless namespaced related validation gis content_gfk authorization" ++ ALL="core basic alphanumeric slashless namespaced related validation content_gfk authorization" + else +- ALL="core customuser basic alphanumeric slashless namespaced related validation gis content_gfk authorization" ++ ALL="core customuser basic alphanumeric slashless namespaced related validation content_gfk authorization" + fi + + +@@ -26,15 +26,23 @@ + fi + + for type in $TYPES; do +- echo "** $type **" ++ echo "** running test $type **" + + if [ $type == 'related' ]; then +- django-admin.py test ${type}_resource --settings=settings_$type +- continue ++ if django-admin.py test ${type}_resource --settings=settings_$type; then ++ continue ++ else ++ echo "Test ${type} failed" ++ exit -1 ++ fi + elif [ $type == 'gis' ]; then +- createdb -T template_postgis tastypie.db ++ createdb -T template_posttastypie.db + fi + +- django-admin.py test $type --settings=settings_$type +- echo; echo ++ if ! django-admin.py test $type --settings=settings_$type; then ++ echo "Test ${type} failed" ++ exit -1 ++ else ++ echo; echo ++ fi + done |