From b590c8d7572b727d565cc0b8ff660d43569845de Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Jun 2026 19:09:37 -0500 Subject: Adding metadata --- dev-python/bleach/Manifest | 1 + dev-python/bleach/bleach-6.3.0.ebuild | 53 +++++++++++++++++++++++++ dev-python/bleach/files/bleach-6.0.0-py39.patch | 48 ++++++++++++++++++++++ dev-python/bleach/metadata.xml | 13 ++++++ 4 files changed, 115 insertions(+) create mode 100644 dev-python/bleach/Manifest create mode 100644 dev-python/bleach/bleach-6.3.0.ebuild create mode 100644 dev-python/bleach/files/bleach-6.0.0-py39.patch create mode 100644 dev-python/bleach/metadata.xml (limited to 'dev-python/bleach') diff --git a/dev-python/bleach/Manifest b/dev-python/bleach/Manifest new file mode 100644 index 000000000000..9719ff37c02c --- /dev/null +++ b/dev-python/bleach/Manifest @@ -0,0 +1 @@ +DIST bleach-6.3.0.tar.gz 203533 BLAKE2B b81c1337155f43ed2dcaff0fe91035b65a4d44b3916f53a29353a9fd18d623e9908db7218dc59589a487d978933dd2680c2e82ab78cb14f64c8d674542ecc248 SHA512 8ebf85f78f7daae90db91e54f368fcc36dde8d93f04cbe469e861d76c55c52d147e756a9d0198e01b3cd93aca966fdaf4d5d35bd2ed3c731e772ed67d5d484a3 diff --git a/dev-python/bleach/bleach-6.3.0.ebuild b/dev-python/bleach/bleach-6.3.0.ebuild new file mode 100644 index 000000000000..a9f4c55868eb --- /dev/null +++ b/dev-python/bleach/bleach-6.3.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="An easy whitelist-based HTML-sanitizing tool" +HOMEPAGE=" + https://github.com/mozilla/bleach/ + https://pypi.org/project/bleach/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos" + +RDEPEND=" + dev-python/packaging[${PYTHON_USEDEP}] + >=dev-python/html5lib-1.2_pre20240221[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/bleach-6.0.0-py39.patch +) + +EPYTEST_DESELECT=( + # this package is not really maintained anymore + 'tests/test_parse_shim.py::test_urlparse[\t :foo.com \n-expected8]' + 'tests/test_parse_shim.py::test_urlparse[ foo.com -expected9]' +) + +src_prepare() { + # unbundle unpatched broken html5lib + rm -r bleach/_vendor || die + sed -i -e 's:bleach\._vendor\.parse:urllib.parse:' \ + bleach/parse_shim.py || die + sed -i -e 's:bleach\._vendor\.::' \ + bleach/html5lib_shim.py \ + bleach/sanitizer.py \ + tests/test_clean.py || die + # indirect html5lib deps + sed -i -e '/webencodings/d' setup.py || die + rm bleach/six_shim.py || die + + distutils-r1_src_prepare +} diff --git a/dev-python/bleach/files/bleach-6.0.0-py39.patch b/dev-python/bleach/files/bleach-6.0.0-py39.patch new file mode 100644 index 000000000000..02ecb614c8b9 --- /dev/null +++ b/dev-python/bleach/files/bleach-6.0.0-py39.patch @@ -0,0 +1,48 @@ +From d6d734f6fbeee2c091212d42e3ea730a1230aad5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Tue, 24 Jan 2023 07:35:45 +0100 +Subject: [PATCH] Remove tests broken by py3.9 + +--- + tests/test_clean.py | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/tests/test_clean.py b/tests/test_clean.py +index 73946a1..f798a15 100644 +--- a/tests/test_clean.py ++++ b/tests/test_clean.py +@@ -551,31 +551,16 @@ def test_attributes_list(): + {"protocols": {"http"}}, + 'valid', + ), +- ( +- 'valid', +- {"protocols": {"http"}}, +- 'valid', +- ), + ( + 'valid', + {"protocols": {"http"}}, + 'valid', + ), +- ( +- 'valid', +- {"protocols": {"http"}}, +- 'valid', +- ), + ( + 'valid', + {"protocols": {"http"}}, + 'valid', + ), +- ( +- 'valid', +- {"protocols": {"http"}}, +- 'valid', +- ), + pytest.param( + *( + 'valid', +-- +2.39.1 + diff --git a/dev-python/bleach/metadata.xml b/dev-python/bleach/metadata.xml new file mode 100644 index 000000000000..90003d6b9aa9 --- /dev/null +++ b/dev-python/bleach/metadata.xml @@ -0,0 +1,13 @@ + + + + + python@gentoo.org + Python + + + + cpe:/a:mozilla:bleach + + baldeagleos-repo + -- cgit v1.3