summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 02:22:16 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 02:22:16 +0000
commitf114c6758b9e7d297d9d9423da430d387da5e9a3 (patch)
treecc2e7baef1b68eb2765d377225a589175833fab0
parent464e655d58b7f363e98edaaf8f3a546b97df714a (diff)
automatic import of python-torchtext
-rw-r--r--python-torchtext.spec24
1 files changed, 24 insertions, 0 deletions
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