summaryrefslogtreecommitdiff
blob: c6c99ff85a56755487de2d3c918a94ca9bbbb1de (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
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{8..10} )

inherit distutils-r1 optfeature

DESCRIPTION="Manipulate DNS records on various DNS providers in a standardized/agnostic way"
HOMEPAGE="
	https://github.com/AnalogJ/lexicon/
	https://pypi.org/project/dns-lexicon/
"
SRC_URI="
	https://github.com/AnalogJ/lexicon/archive/v${PV}.tar.gz
		-> ${P}.gh.tar.gz
"
S="${WORKDIR}/lexicon-${PV}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-python/beautifulsoup4[${PYTHON_USEDEP}]
	dev-python/cryptography[${PYTHON_USEDEP}]
	>=dev-python/importlib_metadata-4[${PYTHON_USEDEP}]
	dev-python/pyyaml[${PYTHON_USEDEP}]
	dev-python/requests[${PYTHON_USEDEP}]
	dev-python/tldextract[${PYTHON_USEDEP}]
"
BDEPEND="
	test? (
		dev-python/boto3[${PYTHON_USEDEP}]
		dev-python/zeep[${PYTHON_USEDEP}]
		dev-python/vcrpy[${PYTHON_USEDEP}]
	)
"

distutils_enable_tests pytest

EPYTEST_IGNORE=(
	# Requires the "localzone" module
	lexicon/tests/providers/test_localzone.py
	# Requires the "softlayer" module
	lexicon/tests/providers/test_softlayer.py
	# Requires the "transip" module
	lexicon/tests/providers/test_transip.py
	# Requires the "oci" module
	lexicon/tests/providers/test_oci.py
	# Uses tldextract which needs Internet access to download its database
	lexicon/tests/providers/test_auto.py
	# All recordings seem to be broken
	lexicon/tests/providers/test_namecheap.py
)

pkg_postinst() {
	if [[ -z ${REPLACING_VERSIONS} ]]; then
		optfeature_header \
			"Install the following packages to enable support for additional DNS providers:"
		optfeature Gransy dev-python/zeep
		optfeature Route53 dev-python/boto3
		optfeature DDNS dev-python/dnspython
	fi
}