aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-bleach/APKBUILD
blob: d4023651bc54eff8778644e076863235e960dbfe (plain) (blame)
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: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-bleach
pkgver=3.3.0
pkgrel=2
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:
#     - GHSA-vv2x-vrpj-qqpq
#   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="51f6706909b0e05e1347405c4a44cce40c5122ccda655bf9bd7e36e5e80af68bbc9c2556b10d3320b5252aa3b9539caada10944149c9353ac72868817a6ae9f1  py3-bleach-3.3.0.tar.gz
b294a3ddbae5c13fdb0489cf46e2c024c97f601052ceb549899cb63bb2972df46384a980a947a0dc307930adc8013dec12a8259db02baaeea909fa8f3e32022d  0002-no_vendored_html5lib.patch"