From 0e33a833f3ddfe5b9e96d5b413c60bb763e37f86 Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Wed, 13 Jul 2022 19:18:45 +0800 Subject: [PATCH] Modify the install way to provides python3dist module --- python-wrapt.spec | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/python-wrapt.spec b/python-wrapt.spec index b2b43ff..5d05d6f 100644 --- a/python-wrapt.spec +++ b/python-wrapt.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: python-wrapt Version: 1.14.0 -Release: 1 +Release: 2 Summary: A Python module for decorators, wrappers and monkey patching License: BSD-2-Clause URL: https://github.com/GrahamDumpleton/wrapt @@ -45,44 +45,24 @@ far more scenarios than typical decorators and provide more predictable and cons %build %py3_build +pushd docs +sphinx-build -b html -d build/doctrees . build/html +popd %install %py3_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 -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . - +%files -n python3-wrapt +%doc README.rst LICENSE +%{python3_sitearch}/{wrapt,wrapt-%{version}-py*.egg-info} - -%files -n python3-wrapt -f filelist.lst - -%files help -f doclist.lst -%{_docdir}/* +%files help +%doc docs/build/html %changelog +* Wed Jul 13 2022 caodongxia - 1.14.0-2 +- Modify the install way to provides python3dist module + * Thu Jun 23 2022 SimpleUpdate Robot - 1.14.0-1 - Upgrade to version 1.14.0 -- Gitee