aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch')
-rw-r--r--sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch b/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch
new file mode 100644
index 000000000..de9fe9a0d
--- /dev/null
+++ b/sci-libs/pytorch/files/0002-Don-t-build-libtorch-again-for-PyTorch-1.4.0.patch
@@ -0,0 +1,30 @@
+From e5003b88ad3a504eb04c0ba66c2f439149de2ee3 Mon Sep 17 00:00:00 2001
+From: Alexey Chernov <4ernov@gmail.com>
+Date: Tue, 5 Nov 2019 00:58:17 +0300
+Subject: [PATCH 2/7] Don't build `libtorch` again for PyTorch
+
+If starting with building of `libtorch` using CMake,
+don't build it again for the sake of running `setup.py`
+to build Python version (PyTorch).
+---
+ setup.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+Index: pytorch-1.4.0_p0/setup.py
+===================================================================
+--- pytorch-1.4.0_p0.orig/setup.py
++++ pytorch-1.4.0_p0/setup.py
+@@ -303,13 +303,6 @@ def build_deps():
+ check_pydep('yaml', 'pyyaml')
+ check_pydep('typing', 'typing')
+
+- build_caffe2(version=version,
+- cmake_python_library=cmake_python_library,
+- build_python=True,
+- rerun_cmake=RERUN_CMAKE,
+- cmake_only=CMAKE_ONLY,
+- cmake=cmake)
+-
+ version_path = os.path.join(cwd, 'torch', 'version.py')
+ with open(version_path, 'w') as f:
+ f.write("__version__ = '{}'\n".format(version))