summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--sources4
-rw-r--r--torchtext.spec13
3 files changed, 19 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 42f354d..4a18cda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
/v0.17.2.tar.gz
/text-0.17.2.tar.gz
+/double-conversion-3.3.0.tar.gz
+/re2-2024-04-01.tar.gz
+/sentencepiece-0.2.0.tar.gz
+/utf8proc-2.9.0.tar.gz
diff --git a/sources b/sources
index 80129bc..aa84f24 100644
--- a/sources
+++ b/sources
@@ -1 +1,5 @@
+b344abb64084a4a1d98a43e67752989b double-conversion-3.3.0.tar.gz
+05e993e11aa173b63552fb4d88e6524c re2-2024-04-01.tar.gz
+6ee244227f5ee8123de05980920e2936 sentencepiece-0.2.0.tar.gz
68518753c6146f84382b0183846452fe text-0.17.2.tar.gz
+7e4ab708f463f99cc1da799726252e7c utf8proc-2.9.0.tar.gz
diff --git a/torchtext.spec b/torchtext.spec
index bd55ca0..fe8367b 100644
--- a/torchtext.spec
+++ b/torchtext.spec
@@ -16,7 +16,12 @@ License: %{pkg_license}
# the url and source
URL: https://pytorch.org/text/stable/index.html
-Source0: https://github.com/pytorch/text/archive/refs/tags/v%{version}.tar.gz#/text-%{version}.tar.gz
+Source0: https://github.com/pytorch/text/archive/refs/tags/v%{version}.tar.gz#/text-%{version}.tar.gz
+
+Source1: https://github.com/google/double-conversion/archive/refs/tags/v3.3.0.tar.gz#/double-conversion-3.3.0.tar.gz
+Source2: https://github.com/google/re2/archive/refs/tags/2024-04-01.tar.gz#/re2-2024-04-01.tar.gz
+Source3: https://github.com/google/sentencepiece/archive/refs/tags/v0.2.0.tar.gz#/sentencepiece-0.2.0.tar.gz
+Source4: https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v2.9.0.tar.gz#/utf8proc-2.9.0.tar.gz
# patch
Patch0: 001-fix-submodule.patch
@@ -27,7 +32,7 @@ BuildRequires: cmake
BuildRequires: ninja-build
# manual add third party lib
-BuildRequires: re2
+BuildRequires: re2-devel
BuildRequires: double-conversion
BuildRequires: sentencepiece
BuildRequires: utf8proc
@@ -61,6 +66,10 @@ Summary: %{pkg_summary}
# the name here should match the name of tar.gz file
%prep
%autosetup -p1 -n text-%{version}
+tar -xvf %{Source1} -C text-%{version}/third_party
+tar -xvf %{Source2} -C text-%{version}/third_party
+tar -xvf %{Source3} -C text-%{version}/third_party
+tar -xvf %{Source4} -C text-%{version}/third_party
%build
%pyproject_build