aboutsummaryrefslogtreecommitdiff
blob: ba5f9627ca9462a24f0d75bf9c729f06d7f0fd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython"

inherit distutils eutils

MY_P=${PN/-/_}-${PV}

#MY_PN="${MY_P}-${PV}"
DESCRIPTION="A Django application that will run cron jobs for other django apps"
HOMEPAGE="http://code.google.com/p/django-evolution/ http://pypi.python.org/pypi/django_evolution/"
SRC_URI="mirror://pypi/${PN:0:1}/${MY_P}/${MY_P}.tar.gz"

KEYWORDS="~amd64 ~x86"
IUSE=""
LICENSE="BSD"
SLOT="0"
PYTHON_MODNAME="django_evolution"
S="${WORKDIR}/${MY_P}"

RDEPEND="dev-python/setuptools"
DEPEND="${RDEPEND}
	dev-python/django"

src_test() {
	# pypy registers 2 fails but does not return non zeros status and carries on!!!
	testing() {
		local exit_status=0
		"$(PYTHON)" tests/runtests.py || exit_status=1
		einfo "the status is $exit_status"
		return $exit_status
	}
	python_execute_function testing
}

src_install() {
	local msg="Remove tests to avoid file collisions"
	distutils_src_install

	rmtests() {
		rm -rf ${ED}/$(python_get_sitedir)/tests/ || die
	}
	python_execute_function --action-message "$msg" rmtests
	dodoc docs/*
}