aboutsummaryrefslogtreecommitdiffstats
path: root/community/duplicity/APKBUILD
blob: eb660755c0ad9818236f6746a1cef0047586caef (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=duplicity
pkgver=2.2.3
pkgrel=1
pkgdesc="Encrypted bandwidth-efficient backup using the rsync algorithm"
url="https://duplicity.gitlab.io/duplicity-web/"
arch="all"
license="GPL-2.0-or-later"
depends="python3 py3-boto3 gpg gpg-agent ncftp py3-fasteners py3-future"
makedepends="python3-dev py3-setuptools librsync-dev gettext py3-wheel py3-gpep517"
checkdepends="py3-pytest py3-pexpect"
subpackages="$pkgname-pyc $pkgname-doc $pkgname-lang"
source="https://gitlab.com/duplicity/duplicity/-/archive/rel.$pkgver/duplicity-rel.$pkgver.tar.bz2"
builddir="$srcdir/duplicity-rel.$pkgver"

prepare() {
	default_prepare

	# their version setting is broken
	sed -i "s|\$version|$pkgver|" duplicity/__init__.py
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest testing/unit \
		--ignore testing/unit/test_cli_main.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6c476a7c92c13305c89265edc11c188122a478c7e7999202a815e040e3c30912346de904a8456acd1e1893f4e4e8c564460672cc7de21d428e8a6e24452ad423  duplicity-rel.2.2.3.tar.bz2
"