# Contributor: zlg <zlg+adelie@zlg.space>
# Maintainer:
pkgname=py3-pyyaml
_pkgname=pyyaml
pkgver=5.1.2
pkgrel=0
pkgdesc="YAML parser and emitter for Python"
url="https://pyyaml.org/wiki/PyYAML"
arch="noarch"
license="MIT"
depends="python3 yaml"
makedepends="python3-dev yaml yaml-dev"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/yaml/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	# Seems like they need Cython to build the C extension now, so it falls back to pure Python.
	# Once we ship Cython we can probably change this.
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="7bc3dceadcfd512ede67581625887d00822464f20d3b646904f4a73afce8cf3b9766829c6004b626c31757edf8e2eedc27e60d96bee13afa68d3296a8a7f33bb  py3-pyyaml-5.1.2.tar.gz"