From 9782215f060b6323751385122c645cbaf6cdeb3c Mon Sep 17 00:00:00 2001
From: Bert Palm <bert.palm@ufz.de>
Date: Wed, 26 Jul 2023 15:01:51 +0200
Subject: [PATCH] fix_distutils_deprecation

---
 setup.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/setup.py b/setup.py
index 1d92394d0..4a27aa02f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,19 +1,17 @@
 # SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
-
-from distutils.util import convert_path
+import os
 
 from setuptools import find_packages, setup
 
 # read the version string from saqc without importing it. See the
 # link for a more detailed description of the problem and the solution
 # https://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package
-vdict = {}
-version_fpath = convert_path("saqc/version.py")
-with open(version_fpath) as f:
+with open(os.path.join("saqc", "version.py")) as f:
+    vdict = {}
     exec(f.read(), vdict)
-version = vdict["__version__"]
+    version = vdict["__version__"]
 
 with open("README.md", "r") as fh:
     long_description = fh.read()
-- 
GitLab