aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-yaml/APKBUILD
blob: ec9b2d891de2c15c1fe287f563360c04e8b7db55 (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: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-yaml
_pkgname=PyYAML
pkgver=3.11
pkgrel=0
pkgdesc="Python bindings for YAML"
url="http://pyyaml.org"
arch="noarch"
license="MIT"
depends=""
makedepends="python2-dev python3-dev yaml-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="http://pyyaml.org/download/pyyaml/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"

	python2 setup.py build || return 1
	python3 setup.py build
}

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

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

_py3() {
	_py python3
}

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

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

md5sums="f50e08ef0fe55178479d3a618efe21db  PyYAML-3.11.tar.gz"
sha256sums="c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8  PyYAML-3.11.tar.gz"
sha512sums="76de005f59e1842108399af53178cfac2c08ee5cc996cc38ab6ec8b046c6b894422c461a1f1ed1df91abf96f154d41170227912cae7336cff88adfd3c0e8d783  PyYAML-3.11.tar.gz"