aboutsummaryrefslogtreecommitdiffstats
path: root/community/breezy/APKBUILD
blob: 26295c32e64c1cc1db0ca6c8f4992e54653f05dd (plain) (blame)
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
# Maintainer: Pedro Filipe <xpecex@outlook.com>
pkgname=breezy
pkgver=3.3.1
pkgrel=0
pkgdesc="Decentralized revision control system"
url="https://www.breezy-vcs.org/"
arch="all"
license="GPL-2.0-or-later"
depends="python3 py3-configobj py3-dulwich py3-patiencediff"
makedepends="
	cython
	py3-gpep517
	py3-setuptools
	py3-setuptools-gettext
	py3-setuptools-rust
	py3-wheel
	python3-dev
	"
checkdepends="py3-subunit py3-testtools"
options="!check" # Requires unittest2
source="https://launchpad.net/brz/${pkgver%.*}/$pkgver/+download/breezy-$pkgver.tar.gz"

case "$CARCH" in
riscv64)
	options="$options textrels"
	;;
esac

prepare() {
	default_prepare
	# Requires launchpadlib
	rm -rf breezy/plugins/launchpad/
}

build() {
	gpep517 build-wheel \
		--wheel-dir dist \
		--output-fd 1
}

check() {
	python3 -m venv --system-site-packages testenv
	testenv/bin/python3 -m installer dist/*.whl
	testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/*.whl
	ln -s brz "$pkgdir"/usr/bin/bzr # backwards compatibility

	find "$pkgdir"/usr/lib/python3*/site-packages -type d -name tests \
		-exec rm -rf {} +
}

sha512sums="
b45e9d1c72b380b832a95012f59ac2e1dec50cb4703d3130f0743eefe3347441bd3caf0cdd2a7897410f48235e1eb75b1e2c5894cabe518cf2a75ba830181043  breezy-3.3.1.tar.gz
"