summaryrefslogtreecommitdiff
path: root/community/py3-hjson/APKBUILD
blob: 3011a4f38ad7b6262b6c6e79f3b6dada40384783 (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
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-hjson
pkgver=3.1.0
pkgrel=1
pkgdesc="Hjson for Python"
url="https://github.com/hjson/hjson-py"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
options="!check" # https://github.com/hjson/hjson-py/pull/19
source="https://files.pythonhosted.org/packages/source/h/hjson/hjson-$pkgver.tar.gz"
builddir="$srcdir/hjson-$pkgver"

prepare() {
	default_prepare

	sed -i "s/^VERSION=.*/&'$pkgver'/" hjson/tool.py
}

build() {
	export SETUPTOOLS_USE_DISTUTILS=stdlib
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	export SETUPTOOLS_USE_DISTUTILS=stdlib
	python3 setup.py install --skip-build --root="$pkgdir"

	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/hjson/tests
}

sha512sums="
6c64730dbde2048e5b0e1cc2448e7e02fe3fea5e00e070d149cc830a141d4fade1b36cd76c51daf9cdd1a3d3db1b80909e8f1568aba75f340528923db0b5d682  hjson-3.1.0.tar.gz
"