%global pypi_name torchtext %global pypi_version 0.16.2 Name: python-%{pypi_name} Version: %{pypi_version} Release: 1%{?dist} Summary: Models, data loaders and abstractions for language processing, powered by PyTorch License: BSD 3-Clause URL: https://github.com/pytorch/text Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/text-%{version}.tar.gz Source1: sentencepiece.zip Patch0: 0001-disable-submodule.patch 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-pytorch %description Models, data loaders and abstractions for language processing, powered by PyTorch %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} Models, data loaders and abstractions for language processing, powered by PyTorch %prep %autosetup -p1 -n text-%{pypi_version} rm -rf third_party/* mkdir third_party/sentencepiece unzip %{SOURCE1} -d third_party/sentencepiece %build %py3_build %install %py3_install %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitearch}/%{pypi_name} %changelog * Sun Mar 31 2024 YunShu - add torchtext