Skip to content

build: replace deprecated setup.py with direct file installation#8711

Merged
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
alexey-tikhonov:setup.py
May 22, 2026
Merged

build: replace deprecated setup.py with direct file installation#8711
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
alexey-tikhonov:setup.py

Conversation

@alexey-tikhonov
Copy link
Copy Markdown
Member

setuptools has deprecated setup.py install (see
#8705). Since the SSSDConfig package is pure Python (3 files), replace setup.py build/install with direct $(INSTALL_DATA) calls in Makefile.am and remove the now-unnecessary setup.py.in template.

Resolves: #8705

Assisted-By: Claude Code (Opus 4.6)

@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label May 18, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the setup.py script and replaces the Python build and installation process with manual commands in Makefile.am. Feedback indicates that these changes inadvertently drop support for Python 2 bindings. It is recommended to restore the installation, uninstallation, and cleanup logic for Python 2 to maintain compatibility, following the new manual installation pattern established for Python 3.

Comment thread Makefile.am
Comment thread Makefile.am
Comment thread Makefile.am
@alexey-tikhonov
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the setuptools-based build and installation process for the SSSDConfig Python module with direct Makefile instructions. It removes src/config/setup.py, simplifies the install-exec-hook and uninstall-hook by using standard INSTALL_DATA and rm commands, and eliminates the need for Debian-specific layout options in the build configuration. I have no feedback to provide.

@alexey-tikhonov alexey-tikhonov force-pushed the setup.py branch 3 times, most recently from a05e132 to 4283ae4 Compare May 18, 2026 14:35
@alexey-tikhonov
Copy link
Copy Markdown
Member Author

@joakim-tjernlund, could you please test this patch?

@joakim-tjernlund
Copy link
Copy Markdown

@joakim-tjernlund, could you please test this patch?

Builds OK with setuptools-scm-10.0.5 installed. Thanks

Copy link
Copy Markdown
Contributor

@justin-stephenson justin-stephenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexey-tikhonov
Copy link
Copy Markdown
Member Author

Does it make sense to follow steps in https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#modernize-setup-py-project instead?

I personally would like to avoid introducing 'pip' dependency for a sake of a so trivial python "package"...

Comment thread Makefile.am
endif

install-exec-hook: installsssddirs
if BUILD_PYTHON2_BINDINGS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove BUILD_PYTHON2_BINDINGS ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably.
C10S doesn't support python2. Debian dropped its support around Debian 12.
Not sure about OpenSUSE (@scabrero, do you know?)

But I'd prefer if it would be a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'd prefer if it would be a separate PR.

Agreed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. C10S doesn't support python2. Debian dropped its support around Debian 12. Not sure about OpenSUSE (@scabrero, do you know?)

But I'd prefer if it would be a separate PR.

Hi, python2 was dropped in Leap 15.4 so ok to remove.

Copy link
Copy Markdown
Contributor

@sumit-bose sumit-bose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

thanks for the patch, the installed files are the same except the deprecated egg-info directory which is not installed anymore, ACK.

bye,
Sumit

setuptools has deprecated `setup.py install`. Since the SSSDConfig
package is pure Python (3 files), replace setup.py build/install
with direct $(INSTALL_DATA) calls in Makefile.am and remove the
now-unnecessary setup.py.in template.

Resolves: SSSD#8705

Assisted-By: Claude Code (Opus 4.6)
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>
@sssd-bot
Copy link
Copy Markdown
Contributor

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeQL (success)
NEUTRAL osh-diff-scan:fedora-rawhide-x86_64:upstream (neutral)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-44-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 Analyze (target) / cppcheck (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-42) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🟢 ci / intgcheck (fedora-45) (success)
🟢 ci / prepare (success)
🔴 ci / system (centos-10) (failure)
🟢 ci / system (fedora-42) (success)
🟢 ci / system (fedora-43) (success)
🔴 ci / system (fedora-44) (failure)
🔴 ci / system (fedora-45) (failure)
➖ Coverity scan / coverity (skipped)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@alexey-tikhonov alexey-tikhonov merged commit 6a36987 into SSSD:master May 22, 2026
10 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SetuptoolsDeprecationWarning: setup.py install is deprecated.

6 participants