aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-markupsafe/APKBUILD
blob: 4790eb901c9aeb10b3a6fe7982f4994dac83ebc8 (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
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-markupsafe
_pkgname=MarkupSafe
pkgver=0.23
pkgrel=3
pkgdesc="Implements a XML/HTML/XHTML Markup safe string"
url="https://github.com/mitsuhiko/markupsafe"
arch="all"
license="BSD"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

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

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

_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" || return 1
	find "$subpkgdir" -name "*.c" -delete
}

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

_py3() {
	_py python3
}

md5sums="f5ab3deee4c37cd6a922fb81e730da6e  MarkupSafe-0.23.tar.gz"
sha256sums="a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3  MarkupSafe-0.23.tar.gz"
sha512sums="4f1fd91ced5e7119584b56cf7b69cfe6fdd9613bd77412368a38e9ef5d1011ba5c76d1d3a0da3d60f9f474627e6c8c8b613a80a668b32d212f09072f8b1f5b28  MarkupSafe-0.23.tar.gz"