public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/amdsmi] epel10: No python for compat
Date: Tue, 09 Jun 2026 22:35:54 GMT	[thread overview]
Message-ID: <178104455424.1.14047452252511201620.rpms-amdsmi-48a281746526@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-06-09 22:35 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=178104455424.1.14047452252511201620.rpms-amdsmi-48a281746526@fedoraproject.org \
    --to=tom.rix@amd.com \
    --cc=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