git: 549507012185 - main - devel/py-xarray-simlab: Fix buld with python-3.12

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 07 Jul 2026 03:06:47 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5495070121853eb139fee944049f0c4da1355393

commit 5495070121853eb139fee944049f0c4da1355393
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-07 03:02:42 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-07 03:02:42 +0000

    devel/py-xarray-simlab: Fix buld with python-3.12
    
    Reported by:    fallout
---
 devel/py-xarray-simlab/files/patch-versioneer.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/devel/py-xarray-simlab/files/patch-versioneer.py b/devel/py-xarray-simlab/files/patch-versioneer.py
new file mode 100644
index 000000000000..234fffada0b5
--- /dev/null
+++ b/devel/py-xarray-simlab/files/patch-versioneer.py
@@ -0,0 +1,16 @@
+-- fix build with python-3.12: replace deprecated SafeConfigParser.readfp() with read_file(), and SafeConfigParser with ConfigParser
+
+--- versioneer.py.orig	2021-03-09 14:56:55 UTC
++++ versioneer.py
+@@ -343,9 +343,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):