aboutsummaryrefslogtreecommitdiff
blob: d79a52e1bbfec65770c80259c02d9de7acd16508 (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.*"

inherit subversion distutils eutils

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/"
ESVN_REPO_URI="http://django-evolution.googlecode.com/svn/trunk/"

KEYWORDS="~amd64 ~x86"
IUSE="test"

LICENSE="BSD"
SLOT="0"
PYTHON_MODNAME="django_evolution"

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

src_test() {
	testing() {
		PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" tests/runtests.py
	}
	python_execute_function testing
}

src_install() {
	# Rename & remove files to avoid file collisions
	adjust() {
		seta=(run-pyflakes.py runtests.py settings.py)
		setb=(_run-pyflakes.py _runtests.py _settings.py)
		for (( i=0 ; i < 3 ; i++ ))
		do
			mv build-${PYTHON_ABI}/lib/tests/${seta[i]} \
			build-${PYTHON_ABI}/lib/tests/${setb[i]}
			einfo ${seta[x]} "moved" || die
		done
		rm build-${PYTHON_ABI}/lib/tests/__init__.py || die
	}
	python_execute_function adjust
	distutils_src_install
	dodoc docs/*
}