From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 796E0158086 for ; Fri, 22 Oct 2021 15:16:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8FB4E085A; Fri, 22 Oct 2021 15:16:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 961A3E085A for ; Fri, 22 Oct 2021 15:16:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4E303431EF for ; Fri, 22 Oct 2021 15:16:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2B630132 for ; Fri, 22 Oct 2021 15:16:29 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1634915756.fdbb4f160a23f80104844c3db6c4d220931d9b5d.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cssutils/, dev-python/cssutils/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/cssutils/Manifest dev-python/cssutils/cssutils-2.3.0.ebuild dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch X-VCS-Directories: dev-python/cssutils/files/ dev-python/cssutils/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: fdbb4f160a23f80104844c3db6c4d220931d9b5d X-VCS-Branch: master Date: Fri, 22 Oct 2021 15:16:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 232d6deb-e930-4c3e-9419-9a005810eea3 X-Archives-Hash: 95bc4189e61f043083aafafa91343fac commit: fdbb4f160a23f80104844c3db6c4d220931d9b5d Author: Arthur Zamarin gentoo org> AuthorDate: Fri Oct 22 14:56:40 2021 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Oct 22 15:15:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdbb4f16 dev-python/cssutils: add 2.3.0, enable py3.10 Signed-off-by: Arthur Zamarin gentoo.org> dev-python/cssutils/Manifest | 1 + dev-python/cssutils/cssutils-2.3.0.ebuild | 38 ++++++++++++++++++++++ .../cssutils/files/cssutils-2.3.0-fix-py3.10.patch | 21 ++++++++++++ .../cssutils/files/cssutils-2.3.0-fix-py3.8.patch | 30 +++++++++++++++++ 4 files changed, 90 insertions(+) diff --git a/dev-python/cssutils/Manifest b/dev-python/cssutils/Manifest index 25ea44ec13a..c729a4620f0 100644 --- a/dev-python/cssutils/Manifest +++ b/dev-python/cssutils/Manifest @@ -1 +1,2 @@ DIST cssutils-2.2.0.tar.gz 731024 BLAKE2B 8da0e8898e7126a6a84f053f6a3411c3830dc4ec1e20b80bba53b1004c0747f0510390e10c611ce655cc8af62bf657f3b69d3a12a49b781f1b20553cd038f601 SHA512 cd9c3d069e18516484894df38f8cbc9abb1ffc5b021538c99c06878d34195619d7928d553049309ac30c144210df6ed616bbd0d04e158d9fbfce166f9935d5a2 +DIST cssutils-2.3.0.tar.gz 725849 BLAKE2B 7c6f0280c24eb9cf8c6e4215fc6a102ea0b1f72f52b06d8396601a19ffe457fa628bbf5b9f6c020185378ddf26c96e4aec11026e686343513db9141c7ca22dfd SHA512 9919224a61222e860a99ec80e6375a472b89c52af72272c1de7bcd5fd31cf8570a04da7762c62a17a85bef2c41b1c67447583087df4c86c1f8969ad4875a76d2 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 00000000000..11a1977ee61 --- /dev/null +++ b/dev-python/cssutils/cssutils-2.3.0.ebuild @@ -0,0 +1,38 @@ +# 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}] + )" + +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 00000000000..540fc7a1cc0 --- /dev/null +++ b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch @@ -0,0 +1,21 @@ +From: Arthur Zamarin +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 +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 00000000000..a3fff246b61 --- /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?= +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