aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-bleach/APKBUILD
blob: ec3cd4f1ee1aa78fc33525fc1fefa24392e5a5b0 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-bleach
pkgver=3.2.0
pkgrel=0
pkgdesc="whitelist-based HTML sanitizing library"
options="!check" # 3 tests fail
url="https://github.com/mozilla/bleach"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-six py3-webencodings py3-html5lib"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/bleach/archive/v$pkgver.tar.gz
	0002-no_vendored_html5lib.patch
	"
builddir="$srcdir/bleach-$pkgver"

# secfixes:
#   3.1.2-r0:
#     - CVE-2020-6816
#   3.1.1-r0:
#     - CVE-2020-6802

build() {
	rm -rf bleach/_vendor
	python3 setup.py build
}

check() {
	python3 -m pytest
}

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

sha512sums="32040071003a2f8e343e7e393db6f5120d9b0925d980f908e50afa5f0e4ce497989b1d9ec951e67c54c25bf80cf88371f83d3bdc9d3a1ccc472f9f8e0bf3305e  py3-bleach-3.2.0.tar.gz
5692c46428eb4a309b917b012661790245cbd7448fe7d9e6a9f71de738897dc3a494dc6a72a73da711b4d3a29c237bb40ea3315f40dbe61a178e4400eaa29a27  0002-no_vendored_html5lib.patch"