From 9d687a686fa8b62d1b7eb5eb04e41153a098a31c Mon Sep 17 00:00:00 2001 From: Julian Bigge Date: Mon, 6 Nov 2023 14:57:09 +0100 Subject: [PATCH] safeeyes: update to 2.1.6. --- srcpkgs/safeeyes/patches/fix-getargspec.patch | 13 --------- .../patches/fix-python3.12-importlib.patch | 28 +++++++++++++++++++ srcpkgs/safeeyes/template | 6 ++-- 3 files changed, 31 insertions(+), 16 deletions(-) delete mode 100644 srcpkgs/safeeyes/patches/fix-getargspec.patch create mode 100644 srcpkgs/safeeyes/patches/fix-python3.12-importlib.patch diff --git a/srcpkgs/safeeyes/patches/fix-getargspec.patch b/srcpkgs/safeeyes/patches/fix-getargspec.patch deleted file mode 100644 index fcef27fa8b132..0000000000000 --- a/srcpkgs/safeeyes/patches/fix-getargspec.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/safeeyes/utility.py b/safeeyes/utility.py -index bf2dede..7e08735 100644 ---- a/safeeyes/utility.py -+++ b/safeeyes/utility.py -@@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0): - Check whether the given function is defined in the module or not. - """ - if hasattr(module, method_name): -- if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args: -+ if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args: - return True - return False - diff --git a/srcpkgs/safeeyes/patches/fix-python3.12-importlib.patch b/srcpkgs/safeeyes/patches/fix-python3.12-importlib.patch new file mode 100644 index 0000000000000..f633b7513bb12 --- /dev/null +++ b/srcpkgs/safeeyes/patches/fix-python3.12-importlib.patch @@ -0,0 +1,28 @@ +diff --git a/safeeyes/utility.py b/safeeyes/utility.py +index 76803e5..ad35134 100644 +--- a/safeeyes/utility.py ++++ b/safeeyes/utility.py +@@ -21,9 +21,9 @@ This module contains utility functions for Safe Eyes and its plugins. + """ + + import errno +-import imp + import inspect + import importlib ++import importlib.util + import json + import locale + import logging +@@ -354,11 +354,7 @@ def module_exist(module): + """ + Check wther the given Python module exists or not. + """ +- try: +- imp.find_module(module) +- return True +- except ImportError: +- return False ++ return importlib.util.find_spec(module) is not None + + + def merge_configs(new_config, old_config): diff --git a/srcpkgs/safeeyes/template b/srcpkgs/safeeyes/template index fc127f3690c09..100064064eab5 100644 --- a/srcpkgs/safeeyes/template +++ b/srcpkgs/safeeyes/template @@ -1,7 +1,7 @@ # Template file for 'safeeyes' pkgname=safeeyes -version=2.1.4 -revision=3 +version=2.1.6 +revision=1 build_style=python3-module hostmakedepends="python3-setuptools python3-devel pkg-config" makedepends="python3-devel cairo-devel libgirepository-devel" @@ -13,4 +13,4 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://slgobinath.github.io/SafeEyes/" distfiles="${PYPI_SITE}/s/safeeyes/safeeyes-${version}.tar.gz" -checksum=4ac651c8e0de611424da956ca4acdf25b4915ffce30fe33e69a2be6173eee821 +checksum=b6fb014dfebecca07307968bf8b51c12f1388e65479e7a18d0be31a0a309d2f3