blob: f826656930cf975d72e75ec03d3c67a381178834 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{12..14} )
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1
inherit distutils-r1
DESCRIPTION="Secure backup system using GnuPG to encrypt data"
HOMEPAGE="https://duplicity.gitlab.io/"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://gitlab.com/duplicity/duplicity.git/"
inherit git-r3
else
SRC_URI="https://gitlab.com/duplicity/duplicity/-/archive/rel.${PV}/${PN}-rel.${PV}.tar.bz2"
S="${WORKDIR}"/${PN}-rel.${PV}
KEYWORDS="~amd64 ~arm64 ~x86 ~x64-macos"
fi
LICENSE="GPL-3"
SLOT="0"
IUSE="s3 test"
COMMON_DEPEND="
app-alternatives/gpg
net-libs/librsync:=
dev-python/fasteners[${PYTHON_USEDEP}]
dev-python/pexpect[${PYTHON_USEDEP}]
"
DEPEND="
${COMMON_DEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/setuptools-scm[${PYTHON_USEDEP}]
test? (
|| ( app-arch/par2cmdline app-arch/par2cmdline-turbo )
)
"
RDEPEND="
${COMMON_DEPEND}
dev-python/paramiko[${PYTHON_USEDEP}]
s3? ( dev-python/boto3[${PYTHON_USEDEP}] )
"
EPYTEST_DESELECT=(
# boto3
testing/unit/test_cli_main.py::CommandlineTest::test_intermixed_args
)
PATCHES=(
"${FILESDIR}"/${PN}-3.0.4.0-fix-docs-cmd.patch
"${FILESDIR}"/${PN}-3.0.5-dont-repeat-standard-paths.patch
)
distutils_enable_tests pytest
python_prepare_all() {
# Linting tests (black, pylint, etc); not relevant for us
rm testing/test_code.py || die
distutils-r1_python_prepare_all
}
python_test() {
# The default portage tempdir is too long for AF_UNIX sockets
local -x TMPDIR DOCKER_GNUPGHOME
TMPDIR="$(mktemp -d --tmpdir=/tmp ${PF}-XXX || die)"
# testing/__init__.py doesn't respect GNUPGHOME
DOCKER_GNUPGHOME="${TMPDIR}/gnupg"
cp -ar "${S}"/testing/gnupg "${DOCKER_GNUPGHOME}"/ || die
epytest
}
pkg_postinst() {
elog "Duplicity has many optional dependencies to support various backends."
elog "Currently it's up to you to install them as necessary."
}
|