diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-01 08:00:51 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-01 08:00:51 +0100 |
commit | d1c14e94a73fba924761cdad7298f3e48c6bc160 (patch) | |
tree | 60b97f0d81b3b06b06acc48ff8856d7c4afa2989 /dev-python/coloredlogs | |
parent | d5ee59790ee8298b8599b0aa0fa21a98b972a44d (diff) |
gentoo auto-resync : 01:07:2024 - 08:00:50
Diffstat (limited to 'dev-python/coloredlogs')
-rw-r--r-- | dev-python/coloredlogs/Manifest | 2 | ||||
-rw-r--r-- | dev-python/coloredlogs/coloredlogs-15.0.1-r2.ebuild | 47 | ||||
-rw-r--r-- | dev-python/coloredlogs/files/coloredlogs-15.0.1-py3.13.patch | 43 |
3 files changed, 92 insertions, 0 deletions
diff --git a/dev-python/coloredlogs/Manifest b/dev-python/coloredlogs/Manifest index 1d799c6d9c71..039073dc0bba 100644 --- a/dev-python/coloredlogs/Manifest +++ b/dev-python/coloredlogs/Manifest @@ -1,4 +1,6 @@ AUX coloredlogs-14.0-fix-install-prefix.patch 1474 BLAKE2B fbd2751c0a4f0f7a412428839b5bd8891b863f609d0c890887b85737d7cce9480ccbd2c4c6bb4e6e600b5ef850c065862ce7867b352f41e262022e21841cf1a1 SHA512 50063a6c14d1d4baf76d6409fc9776ec366500f7fa9b1b9e1270dac456b174b015b907f067c5641d4e74b75abc62ca4cdc641e55af88216101ddc4916198f1c5 +AUX coloredlogs-15.0.1-py3.13.patch 1644 BLAKE2B a6d7f3df8f512a2f17cc80cef01aed6922e49758e4ed31b6a16c2a281b919ada9e00a787caafd5b99d7a0175a2e31ebb362dd35971b6a78767fcc7f52ad5379f SHA512 9d01c37470da45871eb2390a58577c2613c4d0ababbdfc2e01fc6739180efeb3864102d2643f816931bbfa34f259df547d5dec6cd42f67200dae392191ca37d1 DIST coloredlogs-15.0.1.tar.gz 278520 BLAKE2B 446aea9adfc8a1ea7f2e5b4a0279d124a3e174feec4a6d9346059fa00fbcb2717d6480392051cc44f0c1f66e022cfc03238acae59b9496e9f70695d99143dfd6 SHA512 577af26af8d27bca3f10e6aaa257245aba608cc3832985ba57bcb2b590b10bf054796a2210749c15ee1b1a17623e007e4ac3ba17bed6af95544f85f5dfafaf21 EBUILD coloredlogs-15.0.1-r1.ebuild 1066 BLAKE2B d03ac71d207e54b2c4b91fd3ea765bffd6fb017ce6cec2bd9890444c870e5ef452d8d18287a601eeffe14394c7e227ba3e3c111516398a56625ab5405b934bfa SHA512 16b582557e425f5078f911ee1a1ad7ba9549a9b1974c6d19c0ed18418d3d21191a14f020792f05f7a70d98555874d2f2f39468b60aeb979bc8eacb0c4f93888e +EBUILD coloredlogs-15.0.1-r2.ebuild 1103 BLAKE2B 8bf96281ffad4639ece541c3f45992f05c745ac455c957021d932d9f7f5e0832eb921ed9ed27d1821f43030da80dcc69c88f8bd73de03fa73594b58bc0ce9568 SHA512 a5c705093975776a385f65acd6c96516368b67b8dface694258d7609f4033dbb8ec96b8087426935073e403bd54fbae871c68cb5660b853d3d799cf8e1e32d9a MISC metadata.xml 391 BLAKE2B 23995da8632cec6cc75466238f135357b63b28a1d1701f89ff0b565a9e2f7b2a2a78514627de45d2704b02e2f82f11e4b6894f4a6090c9c3d482de5b4036b577 SHA512 b52d94fabe4466b02a4e81dc773786000a8ca6189a7b928e52beb0dd291186cf4331d0ed4b139f0017e18b6ec48238fcf5104dccc5b4abe3aa7e70e60cc5830a diff --git a/dev-python/coloredlogs/coloredlogs-15.0.1-r2.ebuild b/dev-python/coloredlogs/coloredlogs-15.0.1-r2.ebuild new file mode 100644 index 000000000000..8f538d93ebff --- /dev/null +++ b/dev-python/coloredlogs/coloredlogs-15.0.1-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( pypy3 python3_{10..13} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 pypi + +DESCRIPTION="Colored stream handler for the logging module" +HOMEPAGE=" + https://pypi.org/project/coloredlogs/ + https://github.com/xolox/python-coloredlogs + https://coloredlogs.readthedocs.io/en/latest/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + >=dev-python/humanfriendly-9.1[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + dev-python/capturer[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/verboselogs[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-14.0-fix-install-prefix.patch" + "${FILESDIR}/${PN}-15.0.1-py3.13.patch" +) + +distutils_enable_sphinx docs +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # test_auto_install fails because the pth file isn't being loaded + coloredlogs/tests.py::ColoredLogsTestCase::test_auto_install +) + +python_test() { + epytest coloredlogs/tests.py +} diff --git a/dev-python/coloredlogs/files/coloredlogs-15.0.1-py3.13.patch b/dev-python/coloredlogs/files/coloredlogs-15.0.1-py3.13.patch new file mode 100644 index 000000000000..649683b4944e --- /dev/null +++ b/dev-python/coloredlogs/files/coloredlogs-15.0.1-py3.13.patch @@ -0,0 +1,43 @@ +From 9d4f4020897fcf48d381de8e099dc29b53fc9531 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <code@musicinmybrain.net> +Date: Wed, 12 Jun 2024 14:00:28 -0400 +Subject: [PATCH] Replace pipes.quote with shlex.quote on Python 3 + +The shlex.quote() API is available from Python 3.3 on; pipes.quote() was +never documented, and is removed in Python 3.13. + +Fixes #119. + +Upstream-PR: https://github.com/xolox/python-coloredlogs/pull/120 +Upstream-Issue: https://github.com/xolox/python-coloredlogs/issues/119 + +diff --git a/coloredlogs/converter/__init__.py b/coloredlogs/converter/__init__.py +index a424469..96817a0 100644 +--- a/coloredlogs/converter/__init__.py ++++ b/coloredlogs/converter/__init__.py +@@ -9,11 +9,15 @@ + # Standard library modules. + import codecs + import os +-import pipes + import re + import subprocess + import tempfile + ++try: ++ from shlex import quote # Python 3 ++except ImportError: ++ from pipes import quote # Python 2 (removed in 3.13) ++ + # External dependencies. + from humanfriendly.terminal import ( + ANSI_CSI, +@@ -75,7 +79,7 @@ def capture(command, encoding='UTF-8'): + # + # [1] http://man7.org/linux/man-pages/man1/script.1.html + # [2] https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/script.1.html +- command_line = ['script', '-qc', ' '.join(map(pipes.quote, command)), '/dev/null'] ++ command_line = ['script', '-qc', ' '.join(map(quote, command)), '/dev/null'] + script = subprocess.Popen(command_line, stdout=subprocess.PIPE, stderr=dev_null) + stdout, stderr = script.communicate() + if script.returncode == 0: |