aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-setuptools_scm/APKBUILD
blob: d53651f95f6700a8f0a7077868ccf9a83d08e20d (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
# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py-setuptools_scm
_pkgname=setuptools_scm
pkgver=3.3.3
pkgrel=0
pkgdesc="the blessed package to manage your versions by scm tags"
url="https://github.com/pypa/setuptools_scm"
arch="noarch"
license="MIT"
checkdepends="pytest py-pip mercurial"
makedepends="py-setuptools py3-setuptools"
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python2 setup.py build
	python3 setup.py build
}

check() {
	PYTHONPATH=$PWD/src python2 -m pytest
	PYTHONPATH=$PWD/src python3 -m pytest
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="196d4785a1802875d89b9e54ae788e791a9c5cb685109784059955b691242984e42b96d77075116790935f56be82259bc2588d95d65ecbb101261d76daddb83c  setuptools_scm-3.3.3.tar.gz"