public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/iscsi-initiator-utils] rawhide: update spec file handling of python bindings
@ 2026-07-02 17:18 Chris Leech
0 siblings, 0 replies; only message in thread
From: Chris Leech @ 2026-07-02 17:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/iscsi-initiator-utils
Branch : rawhide
Commit : fe781bf06967120a76419a99ad09d39573d7439c
Author : Chris Leech <cleech@redhat.com>
Date : 2026-07-02T10:09:08-07:00
Stats : +12/-50 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/iscsi-initiator-utils/c/fe781bf06967120a76419a99ad09d39573d7439c?branch=rawhide
Log:
update spec file handling of python bindings
- remove python2 support
- use pyproject macros (rhbz#2377292)
---
diff --git a/0101-libiscsi.patch b/0101-libiscsi.patch
index c8c1158..59aa779 100644
--- a/0101-libiscsi.patch
+++ b/0101-libiscsi.patch
@@ -3344,7 +3344,7 @@ index 0000000..caa4e66
--- /dev/null
+++ b/libiscsi/setup.py
@@ -0,0 +1,9 @@
-+from distutils.core import setup, Extension
++from setuptools import setup, Extension
+
+module1 = Extension('libiscsi',
+ sources = ['pylibiscsi.c'],
diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec
index 0cfdea7..0223c69 100644
--- a/iscsi-initiator-utils.spec
+++ b/iscsi-initiator-utils.spec
@@ -6,10 +6,6 @@
# set this to 1 if commit0 is a snapshot after the tagged version
%global with_snapshot 0
-# Disable python2 build by default
-%bcond python2 0
-%bcond python3 1
-
Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils
%if %{with_snapshot}
@@ -61,7 +57,7 @@ Requires(postun): systemd
Conflicts: NetworkManager < 1.20
%global _hardened_build 1
-%global __provides_exclude_from ^(%{?python2_sitearch:%{python2_sitearch}/.*\\.so}|%{?python3_sitearch:%{python3_sitearch}/.*\\.so})$
+%global __provides_exclude_from ^(%{?python3_sitearch:%{python3_sitearch}/.*\\.so})$
%description
The iscsi package provides the server daemon for the iSCSI protocol,
@@ -86,38 +82,24 @@ Requires: %{name} = %{version}-%{release}
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
-%if %{with python2}
-%package -n python2-%{name}
-%{?python_provide:%python_provide python2-%{name}}
-Summary: Python %{python2_version} bindings to %{name}
-Requires: %{name} = %{version}-%{release}
-BuildRequires: python2-devel
-BuildRequires: python2-setuptools
-
-%description -n python2-%{name}
-The %{name}-python2 package contains Python %{python2_version} bindings to the
-libiscsi interface for interacting with %{name}
-%endif
-# ended with python2
-
-%if %{with python3}
%package -n python3-%{name}
-%{?python_provide:%python_provide python3-%{name}}
Summary: Python %{python3_version} bindings to %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: python3-devel
-BuildRequires: python3-setuptools
BuildRequires: make
%description -n python3-%{name}
The %{name}-python3 package contains Python %{python3_version} bindings to the
libiscsi interface for interacting with %{name}
-%endif
-# ended with python3
%prep
%autosetup -p1 -n open-iscsi-%{commit0} -Sgit_am
+%generate_buildrequires
+pushd libiscsi > /dev/null
+%pyproject_buildrequires
+popd > /dev/null
+
%build
# avoid undefined references linking failures
%undefine _ld_as_needed
@@ -127,12 +109,7 @@ libiscsi interface for interacting with %{name}
%make_build LDFLAGS="%{build_ldflags}" iqn_prefix=iqn.1994-05.com.redhat DBROOT=/var/lib/iscsi libiscsi
pushd libiscsi
-%if %{with python2}
- %py2_build
-%endif
-%if %{with python3}
- %py3_build
-%endif
+%pyproject_wheel
touch -r libiscsi.doxy html/*
popd
@@ -181,17 +158,11 @@ rm $RPM_BUILD_ROOT/var/lib/iscsi/ifaces/iface.example
%{__install} -pm 644 libiscsi/libiscsi.h $RPM_BUILD_ROOT%{_includedir}
pushd libiscsi
-%if %{with python2}
- %{__install} -d $RPM_BUILD_ROOT%{python2_sitearch}
- %py2_install
-%endif
-%if %{with python3}
- %{__install} -d $RPM_BUILD_ROOT%{python3_sitearch}
- %py3_install
-%endif
+%{__install} -d $RPM_BUILD_ROOT%{python3_sitearch}
+%pyproject_install
+%pyproject_save_files '*'
popd
-
%post
%systemd_post iscsi.service iscsi-starter.service iscsid.service iscsid.socket iscsi-onboot.service iscsi-init.service iscsi-shutdown.service
@@ -268,16 +239,7 @@ systemctl --no-reload preset iscsi.service iscsi-starter.service &>/dev/null ||
%{_libdir}/pkgconfig/libopeniscsiusr.pc
%{_mandir}/man3/*
-%if %{with python2}
-%files -n python2-%{name}
-%{python2_sitearch}/*
-%endif
-# ended with python2
-
-%if %{with python3}
-%files -n python3-%{name}
-%{python3_sitearch}/*
-%endif
+%files -n python3-%{name} -f %{pyproject_files}
%changelog
%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-02 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 17:18 [rpms/iscsi-initiator-utils] rawhide: update spec file handling of python bindings Chris Leech
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox