aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-distutils-extra/APKBUILD
blob: 99525d6710b71bfb0336b561a7a64153e4fe77d5 (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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-distutils-extra
_pkgname=python-distutils-extra
pkgver=2.39
pkgrel=5
pkgdesc="Enhanced distutils package for python"
url="https://launchpad.net/python-distutils-extra"
arch="noarch"
license="GPL-2.0-or-later"
depends="py-setuptools"
makedepends="py2-setuptools py3-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://launchpad.net/python-distutils-extra/trunk/$pkgver/+download/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

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

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


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

_py2() {
	depends="${depends//py-/py2-}"
	replaces="$pkgname"
	_py python2
}

_py3() {
	depends="${depends//py-/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="e3b4d1ed22767fb4c6dbbdccef960865b6fda01d18dc38cb8f9357c09c7eabb78466fce053e407a196eca257d07d57c5c1ef47f358a5979c7f22e4b11775124e  python-distutils-extra-2.39.tar.gz"