~dricottone/huttese-apk

ref: 5f98174f143411ad2811ec9ccd6cb1127dcd4d47 huttese-apk/sr.ht/py3-webencodings/py-webencodings/APKBUILD -rw-r--r-- 1.2 KiB
5f98174f — Drew DeVault Disable progress meter for abuild-apk 5 years ago
                                                                                
de63f663 Drew DeVault
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
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=py-webencodings
_pkgname=webencodings
pkgver=0.5.1
pkgrel=1
pkgdesc="Character encoding for the web"
url="https://github.com/gsnedders/python-webencodings"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/gsnedders/python-$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/python-$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 setup.py test
	python3 setup.py test
}

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

_py2() {
	depends="${depends//py-/py2-}"
	_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="c5cb34f35fb5bc7ffb88c19eb3262dedbf6231c0ee2871dccbc0f9497193d8209fc20703d451a2bb41a5ff913e63abf7481f7a8f9886c953724e9cf71c34cb74  webencodings-0.5.1.tar.gz"