From 9c65997dd566f4f57bfb3522a3059e0609656379 Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov 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+ --- Makefile.am | 8 ++++---- contrib/sssd.spec.in | 1 + src/config/setup.py.in | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 87d347b46d1..81b80896898 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5365,12 +5365,12 @@ if BUILD_PYTHON2_BINDINGS if [ "$(DESTDIR)" = "" ]; then \ cd $(builddir)/src/config; \ $(PYTHON2) setup.py build --build-base $(abs_builddir)/src/config \ - install $(DISTSETUPOPTS) --prefix=$(PYTHON2_PREFIX) \ + install $(DISTSETUPOPTS) --root=$(PYTHON2_PREFIX) \ --record=$(abs_builddir)/src/config/.files2; \ else \ cd $(builddir)/src/config; \ $(PYTHON2) setup.py build --build-base $(abs_builddir)/src/config \ - install $(DISTSETUPOPTS) --prefix=$(PYTHON2_PREFIX) \ + install $(DISTSETUPOPTS) --root=$(PYTHON2_PREFIX) \ --record=$(abs_builddir)/src/config/.files2 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py2execdir) && \ @@ -5383,12 +5383,12 @@ if BUILD_PYTHON3_BINDINGS if [ "$(DESTDIR)" = "" ]; then \ cd $(builddir)/src/config; \ $(PYTHON3) setup.py build --build-base $(abs_builddir)/src/config \ - install $(DISTSETUPOPTS) --prefix=$(PYTHON3_PREFIX) \ + install $(DISTSETUPOPTS) --root=$(PYTHON3_PREFIX) \ --record=$(abs_builddir)/src/config/.files3; \ else \ cd $(builddir)/src/config; \ $(PYTHON3) setup.py build --build-base $(abs_builddir)/src/config \ - install $(DISTSETUPOPTS) --prefix=$(PYTHON3_PREFIX) \ + install $(DISTSETUPOPTS) --root=$(PYTHON3_PREFIX) \ --record=$(abs_builddir)/src/config/.files3 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py3execdir) && \ diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 66e198350dd..ab482ba91a2 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -135,6 +135,7 @@ BuildRequires: pcre2-devel BuildRequires: pkgconfig BuildRequires: popt-devel BuildRequires: python3-devel +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 27f63c4061c..613b050d538 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',