summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-02-29 05:33:34 +0000
committerCoprDistGit <infra@openeuler.org>2024-02-29 05:33:34 +0000
commit718cb0c8f2f1706b3c6c96388176f5b36680a789 (patch)
treebf93431ccb121f7e22e8990f90b80f692521aa64
parent896abcae6298676827be7ca56cdd1765e7f962e3 (diff)
automatic import of transformersopeneuler23.09
-rw-r--r--transformers.spec23
1 files changed, 16 insertions, 7 deletions
diff --git a/transformers.spec b/transformers.spec
index 7125d9d..bd9d033 100644
--- a/transformers.spec
+++ b/transformers.spec
@@ -58,20 +58,29 @@ Transformers provides thousands of pretrained models to perform tasks on differe
%autosetup -p1 -n %{name}-%{version}
%build
-%py3_build
-python3 setup.py build
-
+%pyproject_build
%install
-%define _unpackaged_files_terminate_build 0
-%py3_install
-python3 setup.py install
+%pyproject_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d docs ]; then cp -arf docs %{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-transformers
%doc *.md
%license LICENSE
-%{python3_sitelib}/*
%{_bindir}/transformers-cli
+%{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
%changelog