From e71b1f86deb5a3e837168d4ee28b55cc34ad75c8ac6f0c62540f2b2cbde90288 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 20 Mar 2024 13:06:29 +0000 Subject: [PATCH] - Add python312.patch to make it compatible with latest python version. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-gwyfile?expand=0&rev=5 --- python-gwyfile.changes | 6 ++++++ python-gwyfile.spec | 6 +++--- python312.patch | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 python312.patch diff --git a/python-gwyfile.changes b/python-gwyfile.changes index 995d9bb..4bc2f3f 100644 --- a/python-gwyfile.changes +++ b/python-gwyfile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 20 13:06:05 UTC 2024 - Daniel Garcia + +- Add python312.patch to make it compatible with latest python + version. + ------------------------------------------------------------------- Fri Feb 19 08:37:09 UTC 2021 - andy great diff --git a/python-gwyfile.spec b/python-gwyfile.spec index de51c51..cb59f94 100644 --- a/python-gwyfile.spec +++ b/python-gwyfile.spec @@ -1,7 +1,7 @@ # # spec file for package python-gwyfile # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,6 @@ %define packagename gwyfile -%define skip_python36 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-gwyfile Version: 0.2.0 Release: 0 @@ -29,6 +27,8 @@ URL: https://github.com/tuxu/gwyfile Source: https://github.com/tuxu/gwyfile/archive/%{version}.tar.gz#/%{packagename}-%{version}.tar.gz # PATCH-FIX-OPENSUSE Fix_depreciated_fromstring_warning.patch andythe_great@pm.me -- Fix fromstring depreciated to frombuffer warning during testing. Patch0: Fix_depreciated_fromstring_warning.patch +# PATCH-FIX-OPENSUSE python312.patch +Patch1: python312.patch BuildRequires: %{python_module numpy} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} diff --git a/python312.patch b/python312.patch new file mode 100644 index 0000000..4d0f842 --- /dev/null +++ b/python312.patch @@ -0,0 +1,16 @@ +Index: gwyfile-0.2.0/versioneer.py +=================================================================== +--- gwyfile-0.2.0.orig/versioneer.py ++++ gwyfile-0.2.0/versioneer.py +@@ -339,9 +339,9 @@ def get_config_from_root(root): + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() ++ parser = configparser.ConfigParser() + with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser.read_file(f) + VCS = parser.get("versioneer", "VCS") # mandatory + + def get(parser, name):