public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/amdsmi] epel10: No python for compat
@ 2026-06-09 22:35 Tom Rix
  0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2026-06-09 22:35 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/amdsmi
            Branch : epel10
            Commit : 48a281746526c50cf8512d23ca356dc833ec657e
            Author : Tom Rix <Tom.Rix@amd.com>
            Date   : 2026-03-11T17:00:40-07:00
            Stats  : +26/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/amdsmi/c/48a281746526c50cf8512d23ca356dc833ec657e?branch=epel10

            Log:
            No python for compat

Signed-off-by: Tom Rix <Tom.Rix@amd.com>

---
diff --git a/amdsmi.spec b/amdsmi.spec
index 8381d47..63312d9 100644
--- a/amdsmi.spec
+++ b/amdsmi.spec
@@ -66,7 +66,7 @@ Version:    %{rocm_version}
 %if %{with preview}
 Release:    0%{?dist}
 %else
-Release:    3%{?dist}
+Release:    4%{?dist}
 %endif
 Summary:    AMD System Management Interface
 
@@ -93,7 +93,10 @@ BuildRequires: cmake
 BuildRequires: gcc-c++
 BuildRequires: kernel-devel
 BuildRequires: libdrm-devel
+# No python install in compat mode.
+%if %{without compat}
 BuildRequires: python3-devel
+%endif
 BuildRequires: rocm-filesystem%{pkg_suffix}
 
 %if %{with test}
@@ -104,7 +107,9 @@ BuildRequires: gtest-devel
 %endif
 %endif
 
+%if %{without compat}
 Requires:      python3dist(pyyaml)
+%endif
 
 # University of Illinois/NCSA Open Source License
 Provides: bundled(esmi_ib_library) = %{esmi_ver}
@@ -183,6 +188,7 @@ sed -i 's@set(SHARE_INSTALL_PREFIX@#set(SHARE_INSTALL_PREFIX@' CMakeLists.txt
 %install
 %cmake_install
 
+%if %{without compat}
 mkdir -p %{buildroot}/%{pkg_prefix}/lib/python%{python3_version}/site-packages
 if [ -d %{buildroot}%{pkg_prefix}/share/amd_smi/amdsmi ]; then
     mv %{buildroot}%{pkg_prefix}/share/amd_smi/amdsmi %{buildroot}/%{pkg_prefix}/lib/python%{python3_version}/site-packages
@@ -192,6 +198,20 @@ else
     mv %{buildroot}%{pkg_prefix}/share/pyproject.toml %{buildroot}/%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi/
 fi
 
+# W: unstripped-binary-or-object /usr/lib/python3.13/site-packages/amdsmi/libamd_smi.so
+# Does an explict open, so can not just rm it
+# let's just strip it
+strip %{buildroot}/%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi/*.so
+# E: non-executable-script .../amdsmi_cli/amdsmi_cli_exceptions.py 644 /usr/bin/env python3
+chmod a+x %{buildroot}/%{pkg_prefix}/libexec/amdsmi_cli/amdsmi_*.py
+
+%else
+rm -f %{buildroot}/%{pkg_prefix}/bin/amd-smi
+rm -rf %{buildroot}/%{pkg_prefix}/libexec/amdsmi_cli
+rm -rf %{buildroot}/%{pkg_prefix}/share/amdsmi
+rm -rf %{buildroot}/%{pkg_prefix}/share/pyproject.toml
+%endif
+
 # Remove some things
 rm -rf %{buildroot}/%{pkg_prefix}/share/example
 rm -rf %{buildroot}/%{pkg_prefix}/share/amd_smi/example
@@ -204,13 +224,6 @@ rm -f %{buildroot}%{pkg_prefix}/share/amd_smi/_version.py
 rm -f %{buildroot}%{pkg_prefix}/share/setup.py
 rm -f %{buildroot}%{pkg_prefix}/share/amd_smi/setup.py
 
-# W: unstripped-binary-or-object /usr/lib/python3.13/site-packages/amdsmi/libamd_smi.so
-# Does an explict open, so can not just rm it
-# let's just strip it
-strip %{buildroot}/%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi/*.so
-# E: non-executable-script .../amdsmi_cli/amdsmi_cli_exceptions.py 644 /usr/bin/env python3
-chmod a+x %{buildroot}/%{pkg_prefix}/libexec/amdsmi_cli/amdsmi_*.py
-
 %if %{with test}
 # put the test files in a reasonable place
 mkdir %{buildroot}%{pkg_prefix}/share/amdsmi
@@ -228,9 +241,11 @@ mv %{buildroot}%{pkg_prefix}/share/tests %{buildroot}%{pkg_prefix}/share/amdsmi/
 %license esmi_ib_library_License.txt 
 %{pkg_prefix}/%{pkg_libdir}/libamd_smi.so.*
 %{pkg_prefix}/%{pkg_libdir}/libgoamdsmi_shim64.so.*
+%if %{without compat}
 %{pkg_prefix}/bin/amd-smi
 %{pkg_prefix}/libexec/amdsmi_cli
 %{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi
+%endif
 
 %files devel
 %{pkg_prefix}/include/amd_smi/
@@ -245,6 +260,9 @@ mv %{buildroot}%{pkg_prefix}/share/tests %{buildroot}%{pkg_prefix}/share/amdsmi/
 %endif
 
 %changelog
+* Wed Mar 11 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.0-4
+- No python for compat
+
 * Wed Mar 11 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.0-3
 - Add --with preview
 - Change URL to rocm-systems

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-09 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 22:35 [rpms/amdsmi] epel10: No python for compat Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox