summaryrefslogtreecommitdiff
path: root/dev-python/cssutils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-26 00:10:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-26 00:10:07 +0100
commit95461df035e3867364495f065e5e805bf629b2d7 (patch)
tree867dce371a84a696e91be255d89f282975aa0480 /dev-python/cssutils
parent46eedbedafdb0040c37884982d4c775ce277fb7b (diff)
gentoo resync : 25.10.2021
Diffstat (limited to 'dev-python/cssutils')
-rw-r--r--dev-python/cssutils/Manifest4
-rw-r--r--dev-python/cssutils/cssutils-2.3.0.ebuild41
-rw-r--r--dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch21
-rw-r--r--dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch30
4 files changed, 96 insertions, 0 deletions
diff --git a/dev-python/cssutils/Manifest b/dev-python/cssutils/Manifest
index 7ca349c66459..d87032259d09 100644
--- a/dev-python/cssutils/Manifest
+++ b/dev-python/cssutils/Manifest
@@ -1,3 +1,7 @@
+AUX cssutils-2.3.0-fix-py3.10.patch 762 BLAKE2B 1830a0ba7d498e52007ab0fa5399c4794cd084babff7efb6060331d8cde4a0e2a653252741874410f051b777891a5d5198a38926efae9fc9239306e81f45c64d SHA512 23dd9517a486281a0133445dbb4ba54961e26f666dfbda3b34552732c0542108b6e387b4213bb4c3504b0e437319f4a8c5482926d8dcc177c1f0cabc3e9a8588
+AUX cssutils-2.3.0-fix-py3.8.patch 922 BLAKE2B 7506c982710040a36d636f665bd273b32c3741ccb0db534b5bf146d671c03132fb90304a27b0bb1f3ab011459dbb1d6a1686921cba90da4eeb3a2eb18ff40319 SHA512 071fba0bdb927fd3f213c2429f0469e0ac8757a4103f3d7a0258214650d468785b96da01cb94d537dd82869f70f0ccbc110cd87c6170a3bb9804f3de57dc164e
DIST cssutils-2.2.0.tar.gz 731024 BLAKE2B 8da0e8898e7126a6a84f053f6a3411c3830dc4ec1e20b80bba53b1004c0747f0510390e10c611ce655cc8af62bf657f3b69d3a12a49b781f1b20553cd038f601 SHA512 cd9c3d069e18516484894df38f8cbc9abb1ffc5b021538c99c06878d34195619d7928d553049309ac30c144210df6ed616bbd0d04e158d9fbfce166f9935d5a2
+DIST cssutils-2.3.0.tar.gz 725849 BLAKE2B 7c6f0280c24eb9cf8c6e4215fc6a102ea0b1f72f52b06d8396601a19ffe457fa628bbf5b9f6c020185378ddf26c96e4aec11026e686343513db9141c7ca22dfd SHA512 9919224a61222e860a99ec80e6375a472b89c52af72272c1de7bcd5fd31cf8570a04da7762c62a17a85bef2c41b1c67447583087df4c86c1f8969ad4875a76d2
EBUILD cssutils-2.2.0.ebuild 801 BLAKE2B e5654f6e24f2a6638435c9135547d2dae2905186b41c9b6b8d10894d5b9d030f600458c05f8e6eb76206226fa86d97a5fcc90f8dc5b4738f8201c429d0690b26 SHA512 37ffb850283c8f481a8b53ea603b210afa859a39d777250697c8a9e161e2a898d1c0c34146f34f3cb1cb9d716e4cbc662ecefe62e73356ff0743c44ce0871cf1
+EBUILD cssutils-2.3.0.ebuild 1013 BLAKE2B af610c53f3aa671d7def07299826b046e125b6874fd4c08cd6f0623ce6e46c436e61d4f9c0ec575784d647a3d768a41e7fd85233cd7e1c806452c0a31637ca4f SHA512 c2ec41b4f41d9fe1a9e6b8e9fbf4d35808f20bce333130a63456c2d32e6e20b383ceadeab3bcab453fb4db62811028c5afe4883efddfed5cbd730a2dca04a029
MISC metadata.xml 404 BLAKE2B 799ecc65093102f5dc56c272245253ad76e69ade2196953bc37547408cbec9c3259c05dd75838c23027cb6a348d03586d2e1d61d37713401ae3cbcfb330275e9 SHA512 b009e78386aee2e8405406ed455c5432e00d5990ca86b49e6ac5db4e3e06102fb968cdc7b55b824c3451156fe2501e3f1deed1f31b48cd1916f90ef515dd8e4e
diff --git a/dev-python/cssutils/cssutils-2.3.0.ebuild b/dev-python/cssutils/cssutils-2.3.0.ebuild
new file mode 100644
index 000000000000..e1c8f1103e0c
--- /dev/null
+++ b/dev-python/cssutils/cssutils-2.3.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="A CSS Cascading Style Sheets library"
+HOMEPAGE="https://pypi.org/project/cssutils/ https://cthedot.de/cssutils/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+
+BDEPEND="
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ dev-python/toml[${PYTHON_USEDEP}]
+ test? (
+ dev-python/cssselect[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/importlib_resources[${PYTHON_USEDEP}]
+ ' python3_8 pypy3)
+ )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-py3.8.patch"
+ "${FILESDIR}/${P}-fix-py3.10.patch"
+)
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ # network
+ encutils/__init__.py::encutils
+ cssutils/tests/test_parse.py::CSSParserTestCase::test_parseUrl
+ examples/website.py::website.logging
+)
diff --git a/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch
new file mode 100644
index 000000000000..540fc7a1cc03
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch
@@ -0,0 +1,21 @@
+From: Arthur Zamarin <arthurzam@gmail.com>
+Date: Fri, 22 Oct 2021 17:48:28 +0300
+Subject: [PATCH] Fix expected error message for python 3.10
+
+python 3.10 adds some words to it's errors, so catch if our expected
+are contained in the actual output
+
+Signed-off-by: Arthur Zamarin <arthurzam@gmail.com>
+https://github.com/jaraco/cssutils/pull/17
+
+--- a/cssutils/tests/basetest.py
++++ b/cssutils/tests/basetest.py
+@@ -126,7 +126,7 @@ class BaseTestCase(unittest.TestCase):
+ if not msg:
+ # No message provided: any message is fine.
+ return
+- elif excMsg == msg:
++ elif msg in excMsg:
+ # Message provided, and we got the right message: passes.
+ return
+ else:
diff --git a/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
new file mode 100644
index 000000000000..a3fff246b616
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 24 May 2021 08:35:13 +0200
+Subject: [PATCH] Force using importlib_resources in Python < 3.9
+
+Force using the external importlib_resources package based on Python
+version rather than the presence of the built-in importlib.resources.
+The latter does not have the needed files() method in Python < 3.9,
+and therefore results in test failures:
+
+ E AttributeError: module 'importlib.resources' has no attribute 'files'
+
+This affects specifically Python 3.7 and 3.8 that have an older version
+of importlib.resources module.
+
+https://github.com/jaraco/cssutils/pull/10
+
+--- a/cssutils/tests/basetest.py
++++ b/cssutils/tests/basetest.py
+@@ -6,9 +6,9 @@
+ import sys
+ import unittest
+
+-try:
++if sys.version_info >= (3, 9):
+ from importlib import resources
+-except ImportError:
++else:
+ import importlib_resources as resources
+
+ import cssutils