Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSSDConfig: use 'setuptools' instead of 'distutils' #6581

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5475,13 +5475,15 @@ install-exec-hook: installsssddirs
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) \
$(MKDIR_P) "$(python2dir)"; \
PYTHONPATH="$(PYTHONPATH):$(python2dir)" $(PYTHON2) setup.py build \
--build-base $(abs_builddir)/src/config install $(DISTSETUPOPTS) --prefix=$(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) \
$(MKDIR_P) "$(python2dir)"; \
PYTHONPATH="$(PYTHONPATH):$(python2dir)" $(PYTHON2) setup.py build \
--build-base $(abs_builddir)/src/config install $(DISTSETUPOPTS) --prefix=$(PYTHON2_PREFIX) \
--record=$(abs_builddir)/src/config/.files2 --root=$(DESTDIR); \
fi
cd $(DESTDIR)$(py2execdir) && \
Expand All @@ -5493,13 +5495,15 @@ endif
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) \
$(MKDIR_P) "$(python3dir)"; \
PYTHONPATH="$(PYTHONPATH):$(python3dir)" $(PYTHON3) setup.py build \
--build-base $(abs_builddir)/src/config install $(DISTSETUPOPTS) --prefix=$(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) \
$(MKDIR_P) "$(python3dir)"; \
PYTHONPATH="$(PYTHONPATH):$(python3dir)" $(PYTHON3) setup.py build \
--build-base $(abs_builddir)/src/config install $(DISTSETUPOPTS) --prefix=$(PYTHON3_PREFIX) \
--record=$(abs_builddir)/src/config/.files3 --root=$(DESTDIR); \
fi
cd $(DESTDIR)$(py3execdir) && \
Expand Down Expand Up @@ -5563,10 +5567,16 @@ uninstall-hook:
if BUILD_PYTHON2_BINDINGS
cd $(DESTDIR)$(py2execdir) && \
rm -f pysss.so pyhbac.so pysss_murmur.so pysss_nss_idmap.so
rm -fr "$(DESTDIR)$(python2dir)/easy-install.pth"
rm -fr "$(DESTDIR)$(python2dir)/__pycache__"
rm -fr "$(DESTDIR)$(python2dir)/site.py"
endif
if BUILD_PYTHON3_BINDINGS
cd $(DESTDIR)$(py3execdir) && \
rm -f pysss.so pyhbac.so pysss_murmur.so pysss_nss_idmap.so
rm -fr "$(DESTDIR)$(python3dir)/easy-install.pth"
rm -fr "$(DESTDIR)$(python3dir)/__pycache__"
rm -fr "$(DESTDIR)$(python3dir)/site.py"
endif
if BUILD_SAMBA
rm $(DESTDIR)/$(winbindplugindir)/sss.so
Expand Down
2 changes: 1 addition & 1 deletion contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/config/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading