public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/net-snmp] f44: Convert to pyproject RPM macros (rhbz#2378557)
@ 2026-11-11 9:49
0 siblings, 0 replies; only message in thread
From: @ 2026-11-11 9:49 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-11 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 9:49 [rpms/net-snmp] f44: Convert to pyproject RPM macros (rhbz#2378557)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox