aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-bleach/APKBUILD
blob: 29f65b9cc95644ef60ef3230548bca1786a8007c (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-bleach
pkgver=4.0.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 py3-packaging"
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.3.0-r0:
#     - CVE-2021-23980
#   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="
c85e625887cf1f4b5cb21ebffdc516028ba9036a5b7ea86838333bcbf6a70dde086bac67b0f67e117eba9f36f5701b2f8df3ef61300a1a2fb6af11ee6d5f06e6  py3-bleach-4.0.0.tar.gz
b294a3ddbae5c13fdb0489cf46e2c024c97f601052ceb549899cb63bb2972df46384a980a947a0dc307930adc8013dec12a8259db02baaeea909fa8f3e32022d  0002-no_vendored_html5lib.patch
"