From 99bec2c21614c8b56f3d60aec1d7f26e0f8583b9 Mon Sep 17 00:00:00 2001 From: yanjianqing Date: Tue, 24 Jun 2025 09:38:09 +0000 Subject: [PATCH] Add the %postun script to delete python3-pycpuinfo legacy files Signed-off-by: yanjianqing --- pycpuinfo.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pycpuinfo.spec b/pycpuinfo.spec index f9f4bef..0cb816f 100644 --- a/pycpuinfo.spec +++ b/pycpuinfo.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: pycpuinfo Version: 9.0.0 -Release: 1 +Release: 2 Summary: Get CPU info with pure Python 2 & 3 License: MIT URL: https://github.com/workhorsy/py-cpuinfo @@ -63,6 +63,11 @@ popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . +%postun -n python3-pycpuinfo +if [ -d %{python3_sitelib}/cpuinfo ]; then + rm -rf %{python3_sitelib}/cpuinfo +fi + %files -n python3-pycpuinfo -f filelist.lst %dir %{python3_sitelib}/* @@ -70,6 +75,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Jun 24 2025 yanjianqing - 9.0.0-2 +- Add the %postun script to delete python3-pycpuinfo legacy files + * Wed Nov 16 2022 jiangxinyu - 9.0.0-1 - Update package to version 9.0.0 -- Gitee