forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michał Górny <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST bleach-3.2.1.tar.gz 179763 BLAKE2B 5288277ceae1f51fb76c360db72fb646e1d391b3e51f29ba2b25f5dba7704af8ef7cfd2db017237dad42ff4a99e502daa29cdf4edd82952e15842e288c50c0dd SHA512 61710f48f00333b38d251360736e19078063433ca4d7aada210a986f7d79b08c79c64b412686c67f360e4b2e8420c40c4b515eb175ab92bd546f88e2ba0e5835 | ||
DIST bleach-3.2.2.tar.gz 180189 BLAKE2B 14b496ced66abb5dadabbfaca7663124deda939c494cfc79803db875bcd4195f3b951962d219d56780de56320948c4d5be294a73a8244d1dfa1ced3fe92862d2 SHA512 20e58b58f6464d819ffbf70d0dbaf4b52eac8894d089291b40c2e27440d5c78577f653020ab6296ca72de27bbad60f58e07ce4bcf140ccb21928b0f600f1c236 | ||
DIST bleach-3.2.3.tar.gz 180414 BLAKE2B 2b46fbedd109649e61b17719cc6fbbaa34e03e878938eee17aa81c66e11887ca9156e5e1b2a99b19f319c99df9fd0ce4d91106acae1638cf2569df0f1c41b788 SHA512 0bee6415ed0d6349311e92b68c4897b830a9ae8c0b1399a35da8ebb76af7b989b67c3e90c24cc34fd8afb903ee5f8de1062a0fa0e34a75328a281cf1706193a0 | ||
DIST bleach-3.3.0.tar.gz 181274 BLAKE2B 32883ef9a77bf1d0cd208217930474285e55f158dc8d7b9c4049ca896cdc5cfb873674aa5f5181c31d46345be29f954badd29969bf156b1cc10eb200214de367 SHA512 8e408289c5175234a383658552e48379da9f570866e4c248a4e5c0b7bdaa9a2e6be545943dd32968cdb425929d51de282cca0678fdc6dd06b6fc2c2f41b58097 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
PYTHON_COMPAT=( python3_{7..9} pypy3 ) | ||
|
||
inherit distutils-r1 | ||
|
||
DESCRIPTION="an easy whitelist-based HTML-sanitizing tool" | ||
HOMEPAGE="https://github.com/mozilla/bleach https://pypi.org/project/bleach/" | ||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos" | ||
|
||
RDEPEND=" | ||
dev-python/packaging[${PYTHON_USEDEP}] | ||
>=dev-python/html5lib-1.0.1-r1[${PYTHON_USEDEP}] | ||
dev-python/six[${PYTHON_USEDEP}] | ||
dev-python/webencodings[${PYTHON_USEDEP}] | ||
" | ||
|
||
distutils_enable_tests pytest | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/bleach-3.2.1-py39.patch | ||
) | ||
|
||
src_prepare() { | ||
# unbundle unpatched broken html5lib | ||
rm -r bleach/_vendor || die | ||
sed -i -e 's:bleach\._vendor\.::' \ | ||
bleach/html5lib_shim.py \ | ||
bleach/sanitizer.py \ | ||
tests/test_clean.py || die | ||
|
||
distutils-r1_src_prepare | ||
} |