public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/net-snmp] f44: Convert to pyproject RPM macros (rhbz#2378557)
Date: Wed, 11 Nov 2026 09:49:24 GMT	[thread overview]
Message-ID: <179439056498.1.2663180867725413000.rpms-net-snmp-96c3a246da8d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/net-snmp
            Branch : f44
            Commit : 96c3a246da8da7375ac321caa580c4c2f54b931d
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-11-06T14:15:53+01:00
            Stats  : +15/-10 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/net-snmp/c/96c3a246da8da7375ac321caa580c4c2f54b931d?branch=f44

            Log:
            Convert to pyproject RPM macros (rhbz#2378557)

This was converted en masse with other packages by LLM and then polished by me.

Assisted-By: Claude Sonnet 5

---
diff --git a/net-snmp.spec b/net-snmp.spec
index c762558..298d2ba 100644
--- a/net-snmp.spec
+++ b/net-snmp.spec
@@ -10,7 +10,7 @@
 Summary:    A collection of SNMP protocol tools and libraries
 Name:       net-snmp
 Version:    5.9.5.2
-Release:    10%{?dist}
+Release:    11%{?dist}
 Epoch:      1
 
 License:    MIT-CMU AND BSD-3-Clause AND MIT
@@ -74,7 +74,7 @@ BuildRequires:   gcc
 BuildRequires:   openssl-devel, bzip2-devel, elfutils-devel
 BuildRequires:   libselinux-devel, elfutils-libelf-devel, rpm-devel
 BuildRequires:   perl-devel, perl(ExtUtils::Embed), procps
-BuildRequires:   python3-devel, python3-setuptools
+BuildRequires:   python3-devel
 BuildRequires:   chrpath
 BuildRequires:   mariadb-connector-c-devel
 BuildRequires:   libnl3-devel
@@ -255,6 +255,9 @@ rm testing/fulltests/default/T200*
 # resulting in a mismatch during "Checking the Net-SNMP configure script validity" test
 autoconf --version | awk 'NR==1 {print $4}' > dist/autoconf-version
 
+%generate_buildrequires
+%pyproject_buildrequires --directory python
+
 %build
 
 # Autoreconf to get autoconf 2.69 for ARM (#926223)
@@ -310,9 +313,7 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 find perl/blib -type f -name "*.so" -print -exec chrpath --delete {} \;
 
 # compile python module
-pushd python
-%{__python3} setup.py --basedir="../" build
-popd
+%pyproject_wheel --directory python -C--global-option=--basedir=../
 
 
 %install
@@ -372,9 +373,8 @@ rm -f README.aix README.hpux11 README.osX README.Panasonic_AM3X.txt README.solar
 install -m 644 local/mib2c.*.conf %{buildroot}%{_datadir}/snmp
 
 # install python module
-pushd python
-%{__python3} setup.py --basedir=.. install -O1 --skip-build --root %{buildroot} 
-popd
+%pyproject_install
+%pyproject_save_files -l netsnmp
 
 find %{buildroot} -name '*.so' | xargs chmod 0755
 
@@ -397,6 +397,9 @@ install -m 755 -d %{buildroot}/%{_unitdir}
 install -m 644 %SOURCE8 %SOURCE9 %{buildroot}/%{_unitdir}/
 
 %check
+export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
+%pyproject_check_import
+
 %if %{netsnmp_check}
 %ifarch ppc ppc64
 rm -vf testing/fulltests/default/T200snmpv2cwalkall_simple
@@ -488,9 +491,8 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
 %attr(0644,root,root) %{_mandir}/man1/traptoemail*.1*
 %attr(0644,root,root) %{_mandir}/man1/snmp-bridge-mib.1*
 
-%files -n python3-net-snmp
+%files -n python3-net-snmp -f %{pyproject_files}
 %doc README
-%{python3_sitearch}/*
 
 %files gui
 %{_bindir}/tkmib
@@ -514,6 +516,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
 %{_libdir}/libnetsnmptrapd*.so.%{soname}*
 
 %changelog
+* Thu Nov 05 2026 Miro Hrončok <miro@hroncok.cz> - 1:5.9.5.2-11
+- Convert to pyproject RPM macros (rhbz#2378557)
+
 * Fri Jul 24 2026 Python Maint <python-maint@redhat.com> - 1:5.9.5.2-10
 - Rebuilt for Python 3.15.0b4 ABI change
 

                 reply	other threads:[~2026-11-11  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179439056498.1.2663180867725413000.rpms-net-snmp-96c3a246da8d@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox