aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-yaml/APKBUILD
blob: 354475679729cb8e0fe453fa9552c896b029b653 (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
# 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.12
pkgrel=0
pkgdesc="Python bindings for YAML"
url="http://pyyaml.org"
arch="all"
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)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

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

md5sums="4c129761b661d181ebf7ff4eb2d79950  PyYAML-3.12.tar.gz"
sha256sums="592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab  PyYAML-3.12.tar.gz"
sha512sums="e16d8b7f4f026b6a95b11fb59c54ec5f114f6f516294eaa95e718abdf5d37c17a9c4b5e0a0a61fca04e801792d9b7fb801087cf849ff22b9581f6af204b1883a  PyYAML-3.12.tar.gz"