From f24de9b44e6f3b44467f20dc51345d5741ab1a2d Mon Sep 17 00:00:00 2001 From: Nick Morrott Date: Wed, 21 Feb 2024 02:47:39 +0000 Subject: [PATCH 1/4] Switch import of distutils.core to after setuptools --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 07181d0..630cd29 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import distutils.core import setuptools +import distutils.core import glob import ueberzug From 411592da1d628c1419048ff611b8871b480dab89 Mon Sep 17 00:00:00 2001 From: eylles Date: Thu, 23 May 2024 22:29:49 -0600 Subject: [PATCH 2/4] add the strtobool function from distutils closes #19 --- ueberzug/conversion.py | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/ueberzug/conversion.py b/ueberzug/conversion.py index 601522d..039be7a 100644 --- a/ueberzug/conversion.py +++ b/ueberzug/conversion.py @@ -1,3 +1,38 @@ +# extracted from distutils +# under license: MIT +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +def strtobool(val): + """Convert a string representation of truth to true (1) or false (0). + + True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values + are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if + 'val' is anything else. + """ + val = val.lower() + if val in ('y', 'yes', 't', 'true', 'on', '1'): + return 1 + elif val in ('n', 'no', 'f', 'false', 'off', '0'): + return 0 + else: + raise ValueError(f"invalid truth value {val!r}") def to_bool(value): @@ -9,6 +44,5 @@ def to_bool(value): Returns: bool: the evaluated boolean """ - import distutils.util return (value if isinstance(value, bool) - else bool(distutils.util.strtobool(value))) + else bool(strtobool(value))) From 9a628479c3a7fafd19d95e90a50353d16231585b Mon Sep 17 00:00:00 2001 From: eylles Date: Thu, 23 May 2024 22:47:18 -0600 Subject: [PATCH 3/4] add: repology status --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 26840dc..403dc05 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ but they will be installed by pip. and void, please request the package maintainer of your favourite distro to package the latest release of ueberzug. + [![Packaging status](https://repology.org/badge/vertical-allrepos/ueberzug.svg)](https://repology.org/project/ueberzug/versions) + Original author rant: At least one packager applies patches to my code. So if there are issues uninstall it and install it via pip. From 8652bc7a4396966540a51c7804c205244bbf8dc2 Mon Sep 17 00:00:00 2001 From: eylles Date: Thu, 23 May 2024 22:49:51 -0600 Subject: [PATCH 4/4] version 18.2.3 --- ueberzug/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ueberzug/__init__.py b/ueberzug/__init__.py index 418aeaa..44ad07b 100644 --- a/ueberzug/__init__.py +++ b/ueberzug/__init__.py @@ -1,4 +1,4 @@ -__version__ = '18.2.2' +__version__ = '18.2.3' __license__ = 'GPLv3' __description__ = 'ueberzug is a command line util which allows to display images in combination with X11' __url_repository__ = 'https://github.com/ueber-devel/ueberzug'