summaryrefslogtreecommitdiff
path: root/dev-python/colorlog
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-24 22:37:36 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-24 22:37:36 +0000
commit6d6af4d900ce1eac4475ff4125a400acbbef3f22 (patch)
treea92271f0b1f5e3ea840610695338d0356a484c47 /dev-python/colorlog
parentfaddeff65d652bda3291eba255955adb17f1aa19 (diff)
gentoo auto-resync : 24:11:2023 - 22:37:36
Diffstat (limited to 'dev-python/colorlog')
-rw-r--r--dev-python/colorlog/Manifest3
-rw-r--r--dev-python/colorlog/colorlog-6.7.0.ebuild13
-rw-r--r--dev-python/colorlog/files/colorlog-6.7.0-nocolor.patch31
3 files changed, 43 insertions, 4 deletions
diff --git a/dev-python/colorlog/Manifest b/dev-python/colorlog/Manifest
index 35a3d95a1d7a..818d34d1b629 100644
--- a/dev-python/colorlog/Manifest
+++ b/dev-python/colorlog/Manifest
@@ -1,3 +1,4 @@
+AUX colorlog-6.7.0-nocolor.patch 1066 BLAKE2B ea43721681af7de1cc95ee931d0b111a23327e8ef6684c2f08f3f6b56be54ffb2c1ffa54c2fdc297ec4183ea574e805636f432f4d76d84ee82d7eee9b95d2f21 SHA512 a001bd56036c62091c54b171f1bd0961fa51b33f7db091c1f0d409ab02b0c1d86f77011228a4f2016c277dafe8357fb5de992929276e3088fa60bc833ec9fa51
DIST colorlog-6.7.0.tar.gz 29920 BLAKE2B b4240f3fd17b17ead968293e54d5f4e589515d333a6cdf157a6d913c7457deff67d320ee87270ce05b853616134901c8ac47c4a542ef74158e1174d92de00b3c SHA512 19b3c04beb8ac26d3db69f78bc1e7db40288c95ba7edc7c1d2495d592262dea9a1bf91e42dce0e575341eb2a572f0050866970f23d3be8c5adae518c4115787d
-EBUILD colorlog-6.7.0.ebuild 437 BLAKE2B 030a2eb4056b0de0c098cd72e44b313d91c801e67f2d1108625cc43cb0f7ee0cce1e5374649ce16927fdf1bc70afe3304cde0b32b679f4eebaabc48d75ac9b70 SHA512 683a362c5f055280bd1bead239bf23961112faf2e76fda410017201abaf9caec7f570a70d675bb1a4fdf07b1b54fdd1467730aa83170b841f1a6bd1ec270b9d8
+EBUILD colorlog-6.7.0.ebuild 488 BLAKE2B cf562e70eafce89ef2be920e0bb1857630f69a7e79d538d96c30c4e040310b29e762ff70a5e9bf0429537ddd7f7fc4c0bec5031653940695df91830edfbbc6dc SHA512 1828302f9124a274490144be8555798d2abee64c209e0ebb9644aa0ea8585262a8cc50c36384555d50178cc3285f344fad2857384ab8b33630a111c6b3c27984
MISC metadata.xml 415 BLAKE2B 4b7aecb1bfde4142a6d3f090e5aa93245e98a5ad63238e141666d1b4ea621a8cde4a9b642b44ff8792fa3bea6d50107b084bf07f9eeb41074f34746be934c0f0 SHA512 66bb051d87b620dc5f04dfacb5abc9a67b87bc28f9cb60f99ace58731c8e23576d061bc16a84942d4c69eb04563a3effa7a21f10392e58256bc73e3414ae798d
diff --git a/dev-python/colorlog/colorlog-6.7.0.ebuild b/dev-python/colorlog/colorlog-6.7.0.ebuild
index deeab2c63621..fd1f5d028ae7 100644
--- a/dev-python/colorlog/colorlog-6.7.0.ebuild
+++ b/dev-python/colorlog/colorlog-6.7.0.ebuild
@@ -5,14 +5,21 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
inherit distutils-r1 pypi
DESCRIPTION="Log formatting with colors"
-HOMEPAGE="https://pypi.org/project/colorlog/
- https://github.com/borntyping/python-colorlog"
+HOMEPAGE="
+ https://pypi.org/project/colorlog/
+ https://github.com/borntyping/python-colorlog/
+"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 ~arm64 ~riscv x86"
+KEYWORDS="amd64 arm64 ~riscv x86"
distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}/${P}-nocolor.patch"
+)
diff --git a/dev-python/colorlog/files/colorlog-6.7.0-nocolor.patch b/dev-python/colorlog/files/colorlog-6.7.0-nocolor.patch
new file mode 100644
index 000000000000..cbd799a2f0d7
--- /dev/null
+++ b/dev-python/colorlog/files/colorlog-6.7.0-nocolor.patch
@@ -0,0 +1,31 @@
+From 4babdb5f18bd4799c25d61f0f7937b5e164770cc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 24 Nov 2023 16:45:42 +0100
+Subject: [PATCH] Fix running tests in environment with NO_COLOR=1
+
+Fix running the test suite when pytest is run with NO_COLOR=1 set
+in the environment. An fixture is autoused to ensure that the variables
+are removed for the scope of the test, while they are respected
+e.g. by pytest itself.
+---
+ colorlog/tests/conftest.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/colorlog/tests/conftest.py b/colorlog/tests/conftest.py
+index 65fd6d4..33e23e6 100644
+--- a/colorlog/tests/conftest.py
++++ b/colorlog/tests/conftest.py
+@@ -28,6 +28,13 @@ def assert_log_message(capsys, log_function, message, *args):
+ return err
+
+
++@pytest.fixture(autouse=True)
++def clean_env(monkeypatch):
++ monkeypatch.delenv("FORCE_COLOR", raising=False)
++ monkeypatch.delenv("NO_COLOR", raising=False)
++ yield
++
++
+ @pytest.fixture()
+ def reset_loggers():
+ logging.root.handlers = list()