summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 20:05:49 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 20:05:49 +0000
commit5f2b67f621697fa6694727a298404b880d7d4b36 (patch)
tree37f0cdf7edf34176adf9f1a2a880ffd29028881a
parent4e99125cf5557691e5b0c1f4dd93b4b0cc15276c (diff)
automatic import of python-torchtextopeneuler23.09
-rw-r--r--python-torchtext.spec65
1 files changed, 33 insertions, 32 deletions
diff --git a/python-torchtext.spec b/python-torchtext.spec
index 49c4e26..5f7635f 100644
--- a/python-torchtext.spec
+++ b/python-torchtext.spec
@@ -1,13 +1,13 @@
-%global pypi_name torchtext
-%global pypi_version 0.16.2
+%global pkg_name torchtext
+%global pkg_version 0.16.2
%global pkg_summary Models, data loaders and abstractions for language processing, powered by PyTorch
%global pkg_description %{expand:
%{pkg_summary}}
%global _empty_manifest_terminate_build 0
-Name: python-%{pypi_name}
-Version: %{pypi_version}
-Release: 1%{?dist}
+Name: python-%{pkg_name}
+Version: %{pkg_version}
+Release: 1
Summary: %{pkg_summary}
License: BSD 3-Clause
@@ -16,48 +16,48 @@ Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/text-%{version}.tar
Patch0: 0001-disable-submodule.patch
-BuildRequires: cmake
-BuildRequires: ninja-build
-BuildRequires: utf8proc-devel
-BuildRequires: re2-devel
-BuildRequires: double-conversion-devel
+BuildRequires: cmake
+BuildRequires: ninja-build
+BuildRequires: utf8proc-devel
+BuildRequires: re2-devel
+BuildRequires: double-conversion-devel
-BuildRequires: python3-tqdm
-BuildRequires: python3-requests
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-setuptools_scm
-BuildRequires: python3-pbr
-BuildRequires: python3-pip
-BuildRequires: python3-wheel
-BuildRequires: python3-hatchling
+BuildRequires: python3-tqdm
+BuildRequires: python3-requests
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+BuildRequires: python3-pbr
+BuildRequires: python3-pip
+BuildRequires: python3-wheel
+BuildRequires: python3-hatchling
-BuildRequires: python3-pytorch >= 2.1.2
+BuildRequires: python3-pytorch >= 2.1.2
%description
%{pkg_description}
-%package -n python3-%{pypi_name}
+%package -n python3-%{pkg_name}
Summary: %{pkg_summary}
-%description -n python3-%{pypi_name}
+%description -n python3-%{pkg_name}
%{pkg_description}
-%package doc
-Summary: the documentation for %{pypi_name}
+%package help
+Summary: the documents and examples for %{pkg_name}
-%description doc
-This package contains the documentation for %{pypi_name}
+%description help
+This package contains the documents and examples for %{pkg_name}
%prep
-%autosetup -p1 -n text-%{pypi_version}
+%autosetup -p1 -n text-%{pkg_version}
%build
%pyproject_build
%install
%pyproject_install
-# doc pkg:
+# help pkg files:
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
@@ -71,16 +71,17 @@ fi
popd
mv %{buildroot}/doclist.lst .
-%files -n python3-%{pypi_name}
+%files -n python3-%{pkg_name}
%license LICENSE
%doc README.rst
-%{python3_sitearch}/%{pypi_name}*
+%{python3_sitearch}/%{pkg_name}*
-%files doc -f doclist.lst
+%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Apr 15 2024 YunShu
-- add doc subpackage
+- add help subpackage
+
* Sun Mar 31 2024 YunShu
- add torchtext