summaryrefslogtreecommitdiff
path: root/dev-python/django-tables2/django-tables2-2.7.0.ebuild
blob: e4c4723a2f79ab3f277c311b5a73a554112cdc87 (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
51
52
53
54
55
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )

inherit distutils-r1

DESCRIPTION="Table/data-grid framework for Django"
HOMEPAGE="
	https://pypi.org/project/django-tables2/
	https://github.com/jieter/django-tables2/
"
SRC_URI="
	https://github.com/jieter/django-tables2/archive/v${PV}.tar.gz
		-> ${P}.gh.tar.gz
"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
	>=dev-python/django-3.2[${PYTHON_USEDEP}]
"
BDEPEND="
	test? (
		${RDEPEND}
		dev-python/django-filter[${PYTHON_USEDEP}]
		dev-python/lxml[${PYTHON_USEDEP}]
		|| (
			(
				>=dev-python/django-4.2[${PYTHON_USEDEP}]
				dev-python/psycopg:*[${PYTHON_USEDEP}]
			)
			dev-python/psycopg:2[${PYTHON_USEDEP}]
		)
		dev-python/pytz[${PYTHON_USEDEP}]
	)
"

src_prepare() {
	# these tests require tablib
	rm tests/test_export.py tests/test_templatetags.py || die

	distutils-r1_src_prepare
}

python_test() {
	"${EPYTHON}" manage.py test -v 2 tests || die
}