From 9dafe075dd8f796cf38bebe6c05181387df7eadc Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Wed, 11 Jun 2025 09:47:10 +0800 Subject: [PATCH] Fix the problem of residual directory after uninstallation --- python-termcolor.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python-termcolor.spec b/python-termcolor.spec index 580dc58..be9898f 100644 --- a/python-termcolor.spec +++ b/python-termcolor.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: python-termcolor Version: 2.3.0 -Release: 1 +Release: 2 Summary: ANSII Color formatting for output in terminal. License: MIT URL: http://pypi.python.org/pypi/termcolor @@ -30,12 +30,13 @@ ANSII Color formatting for output in terminal. %prep %autosetup -n termcolor-%{version} -p1 +rm -rf %{python3_sitelib}/termcolor-*.dist-info %build %pyproject_build %install -%pyproject_install termcolor==%{version} +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -63,13 +64,15 @@ mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-termcolor -f filelist.lst -%dir %{python3_sitelib}/* -%{python3_sitelib}/termcolor/__pycache__/* +%{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog +* Wed Jun 11 2025 yaoxin <1024769339@qq.com> - 2.3.0-2 +- Fix the problem of residual directory after uninstallation + * Fri May 05 2023 yaoxin - 2.3.0-1 - Update to 2.3.0 -- Gitee