From f114c6758b9e7d297d9d9423da430d387da5e9a3 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 15 Apr 2024 02:22:16 +0000 Subject: automatic import of python-torchtext --- python-torchtext.spec | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/python-torchtext.spec b/python-torchtext.spec index 874b193..6d5e6dd 100644 --- a/python-torchtext.spec +++ b/python-torchtext.spec @@ -42,6 +42,12 @@ Summary: %{pkg_summary} %description -n python3-%{pypi_name} %{pkg_description} +%package doc +Summary: the documentation for %{pypi_name} + +%description doc +This package contains the documentation for %{pypi_name} + %prep %autosetup -p1 -n text-%{pypi_version} @@ -50,12 +56,30 @@ Summary: %{pkg_summary} %install %pyproject_install +# doc pkg: +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} +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}/doclist.lst . %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitearch}/%{pypi_name}* +%files doc -f doclist.lst +%{_docdir}/* + %changelog +* Mon April 15 2024 YunShu +- add doc subpackage * Sun Mar 31 2024 YunShu - add torchtext -- cgit v1.2.3