summaryrefslogtreecommitdiff
path: root/0001-disable-submodule.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-03-31 08:50:47 +0000
committerCoprDistGit <infra@openeuler.org>2024-03-31 08:50:47 +0000
commit412fbdad227c45d8e9170e72ad9a68862abbf18a (patch)
treef0dd1c642b1296f57b47df81389c0a37346b329a /0001-disable-submodule.patch
parentb7b6120b40cff16c8de5660a4eb3676c4700ad12 (diff)
automatic import of python-torchtext
Diffstat (limited to '0001-disable-submodule.patch')
-rw-r--r--0001-disable-submodule.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/0001-disable-submodule.patch b/0001-disable-submodule.patch
new file mode 100644
index 0000000..92d43da
--- /dev/null
+++ b/0001-disable-submodule.patch
@@ -0,0 +1,49 @@
+diff --git a/setup.py b/setup.py
+index d008cb9c9..f4d455a65 100644
+--- a/setup.py
++++ b/setup.py
+@@ -93,7 +93,7 @@ class clean(distutils.command.clean.clean):
+ shutil.rmtree(str(path), ignore_errors=True)
+
+
+-_init_submodule()
++# _init_submodule()
+ setup_info = dict(
+ # Metadata
+ name="torchtext",
+diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
+index f21199723..aef30499a 100644
+--- a/third_party/CMakeLists.txt
++++ b/third_party/CMakeLists.txt
+@@ -5,7 +5,4 @@ if(POLICY CMP0091)
+ cmake_policy(SET CMP0091 NEW)
+ endif()
+
+-add_subdirectory(re2 EXCLUDE_FROM_ALL)
+-add_subdirectory(double-conversion EXCLUDE_FROM_ALL)
+ add_subdirectory(sentencepiece EXCLUDE_FROM_ALL)
+-add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
+diff --git a/torchtext/csrc/CMakeLists.txt b/torchtext/csrc/CMakeLists.txt
+index 5d67bba8a..7bae152e7 100644
+--- a/torchtext/csrc/CMakeLists.txt
++++ b/torchtext/csrc/CMakeLists.txt
+@@ -19,9 +19,6 @@ set(
+ LIBTORCHTEXT_INCLUDE_DIRS
+ ${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/third_party/sentencepiece/src
+- $<TARGET_PROPERTY:re2,INCLUDE_DIRECTORIES>
+- $<TARGET_PROPERTY:double-conversion,INCLUDE_DIRECTORIES>
+- $<TARGET_PROPERTY:utf8proc,INCLUDE_DIRECTORIES>
+ ${TORCH_INSTALL_PREFIX}/include
+ ${TORCH_INSTALL_PREFIX}/include/torch/csrc/api/include
+ )
+@@ -120,9 +117,6 @@ if (BUILD_TORCHTEXT_PYTHON_EXTENSION)
+ EXTENSION_INCLUDE_DIRS
+ ${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/third_party/sentencepiece/src
+- $<TARGET_PROPERTY:re2,INCLUDE_DIRECTORIES>
+- $<TARGET_PROPERTY:double-conversion,INCLUDE_DIRECTORIES>
+- $<TARGET_PROPERTY:utf8proc,INCLUDE_DIRECTORIES>
+ ${TORCH_INSTALL_PREFIX}/include
+ ${TORCH_INSTALL_PREFIX}/include/torch/csrc/api/include
+ )