From b08fe6d6a97e08479c631c9a80f8d001360ad12d Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Thu, 7 Jul 2022 19:07:17 +0800 Subject: [PATCH] Resolve the compilation fails, due to python-testtools update to 2.5.0 --- python-daemon-safe_hasattr.patch | 20 ++++++++++++++++++++ python-daemon.spec | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 python-daemon-safe_hasattr.patch diff --git a/python-daemon-safe_hasattr.patch b/python-daemon-safe_hasattr.patch new file mode 100644 index 0000000..0721855 --- /dev/null +++ b/python-daemon-safe_hasattr.patch @@ -0,0 +1,20 @@ +diff --color -Nur python-daemon-2.3.0.orig/test/test_metadata.py python-daemon-2.3.0/test/test_metadata.py +--- python-daemon-2.3.0.orig/test/test_metadata.py 2021-02-20 21:45:31.000000000 -0800 ++++ python-daemon-2.3.0/test/test_metadata.py 2021-08-07 14:13:30.307834642 -0700 +@@ -28,6 +28,7 @@ + import pkg_resources + import testtools.helpers + import testtools.matchers ++import extras + + from . import scaffold + from .scaffold import unicode +@@ -44,7 +45,7 @@ + def match(self, instance): + """ Assert the object `instance` has an attribute named `name`. """ + result = None +- if not testtools.helpers.safe_hasattr(instance, self.attribute_name): ++ if not extras.safe_hasattr(instance, self.attribute_name): + result = AttributeNotFoundMismatch(instance, self.attribute_name) + return result + diff --git a/python-daemon.spec b/python-daemon.spec index c851b1e..4409cda 100644 --- a/python-daemon.spec +++ b/python-daemon.spec @@ -1,6 +1,6 @@ Name: python-daemon Version: 2.2.4 -Release: 2 +Release: 3 Summary: Library to implement a well-behaved Unix daemon process License: GPL-3.0-only and Apache-2.0 @@ -9,6 +9,7 @@ Source0: https://files.pythonhosted.org/packages/05/97/210f94322675c83831 # Downstream-only patch, twine is unnecessary to build # https://pagure.io/python-daemon/c/cc9e6a0321a547aacd568aa1e8c7d94a000d5d11 Patch0: remove-twine-dependency.patch +Patch1: python-daemon-safe_hasattr.patch BuildArch: noarch BuildRequires: python3-devel, python3-setuptools @@ -51,6 +52,9 @@ PYTHONPATH=$(pwd) %{__python3} -m unittest discover %{python3_sitelib}/python_daemon-%{version}-py%{python3_version}.egg-info/ %changelog +* Thu Jul 07 2022 yaoxin - 2.2.4-3 +- Resolve the compilation fails, due to python-testtools update to 2.5.0 + * Tue Jun 07 2022 liukuo - 2.2.4-2 - License compliance rectification -- Gitee