aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-hatch-vcs/APKBUILD
blob: cb64d7d3873e148ddf52bf85084d8fab0d19d598 (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
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-hatch-vcs
pkgver=0.2.0
pkgrel=0
pkgdesc="Hatch plugin for versioning with your preferred VCS"
url="https://github.com/ofek/hatch-vcs"
arch="noarch"
license="MIT"
depends="python3 py3-hatchling py3-setuptools_scm"
makedepends="py3-build py3-installer py3-wheel"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/h/hatch-vcs/hatch_vcs-$pkgver.tar.gz
	$pkgname-fix-test.patch::https://github.com/ofek/hatch-vcs/commit/17011d84bb574cc41761bdf460a6f3e443cb97e8.patch
	"
builddir="$srcdir/hatch_vcs-$pkgver"

build() {
	python3 -m build --skip-dependency-check --no-isolation --wheel .
}

check() {
	python3 -m installer -d testenv \
		dist/hatch_vcs-$pkgver-py2.py3-none-any.whl
	local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
	PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/hatch_vcs-$pkgver-py2.py3-none-any.whl
}

sha512sums="
3eb0b04022d4801a982d90a3a0e34e59fcf7dd04c0c2db91c0306b4187ba466ac85ecbb80943a35f4a6a4912bc2ddf2633fab897e8820f5e1ee9d200147b5faf  hatch_vcs-0.2.0.tar.gz
e055571e4e82f380a914902e7cdd32308d29354bff9296bbaf188987744acd9223f2207d8a1c73afd524b27d9900b5dbdf3d66866b1fbb72e6b941dd1efd16fa  py3-hatch-vcs-fix-test.patch
"