diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/bleach | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/bleach')
| -rw-r--r-- | dev-python/bleach/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/bleach/bleach-6.3.0.ebuild | 53 | ||||
| -rw-r--r-- | dev-python/bleach/files/bleach-6.0.0-py39.patch | 48 | ||||
| -rw-r--r-- | dev-python/bleach/metadata.xml | 13 |
4 files changed, 115 insertions, 0 deletions
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?= <mgorny@gentoo.org> +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"}}, + '<a href="example.com">valid</a>', + ), +- ( +- '<a href="example.com:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="example.com:8000">valid</a>', +- ), + ( + '<a href="localhost">valid</a>', + {"protocols": {"http"}}, + '<a href="localhost">valid</a>', + ), +- ( +- '<a href="localhost:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="localhost:8000">valid</a>', +- ), + ( + '<a href="192.168.100.100">valid</a>', + {"protocols": {"http"}}, + '<a href="192.168.100.100">valid</a>', + ), +- ( +- '<a href="192.168.100.100:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="192.168.100.100:8000">valid</a>', +- ), + pytest.param( + *( + '<a href="192.168.100.100:8000/foo#bar">valid</a>', +-- +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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <stabilize-allarches /> + <upstream> + <remote-id type="cpe">cpe:/a:mozilla:bleach</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
