gentoo/sys-auth/sssd/files/sssd-2.9.4-SSSDConfig-use-setuptools-instead-of-distutils.patch

45 lines
1.3 KiB
Diff

From 9efd79b010dbb46d9968c3d3ab073b8e585cb2ad Mon Sep 17 00:00:00 2001
From: Alexey Tikhonov <atikhono@redhat.com>
Date: Sat, 18 Feb 2023 16:11:10 +0100
Subject: [PATCH] SSSDConfig: use 'setuptools' instead of 'distutils'
The Python standard library distutils module will be removed from Python 3.12+
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
---
contrib/sssd.spec.in | 2 +-
src/config/setup.py.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 6431fc9d79..21571bd976 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -144,7 +144,7 @@ BuildRequires: pcre2-devel
BuildRequires: pkgconfig
BuildRequires: popt-devel
BuildRequires: python3-devel
-BuildRequires: (python3-setuptools if python3 >= 3.12)
+BuildRequires: python3-setuptools
BuildRequires: samba-devel
# required for idmap_sss.so
BuildRequires: samba-winbind
diff --git a/src/config/setup.py.in b/src/config/setup.py.in
index 27f63c4061..613b050d53 100644
--- a/src/config/setup.py.in
+++ b/src/config/setup.py.in
@@ -19,10 +19,10 @@
#
"""
-Python-level packaging using distutils.
+Python-level packaging using setuptools.
"""
-from distutils.core import setup
+from setuptools import setup
setup(
name='SSSDConfig',