commit:     f4836af254dee6b81c749b3df569d7c5bd6faa98
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 21:40:49 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Mar 24 21:41:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4836af2

sci-libs/pytorch: drop building an empty .so

Closes: https://bugs.gentoo.org/902727
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-libs/pytorch/files/pytorch-1.13.1-emptyso.patch       | 15 +++++++++++++++
 ...{pytorch-1.13.1-r1.ebuild => pytorch-1.13.1-r2.ebuild} |  1 +
 2 files changed, 16 insertions(+)

diff --git a/sci-libs/pytorch/files/pytorch-1.13.1-emptyso.patch 
b/sci-libs/pytorch/files/pytorch-1.13.1-emptyso.patch
new file mode 100644
index 000000000000..1479354b7f7a
--- /dev/null
+++ b/sci-libs/pytorch/files/pytorch-1.13.1-emptyso.patch
@@ -0,0 +1,15 @@
+--- a/setup.py 2023-03-24 22:36:50.361860100 +0100
++++ b/setup.py 2023-03-24 22:36:57.384752383 +0100
+@@ -922,12 +922,6 @@
+                     name=str('caffe2.python.caffe2_pybind11_state_hip'),
+                     sources=[]),
+             )
+-    if cmake_cache_vars['BUILD_FUNCTORCH']:
+-        extensions.append(
+-            Extension(
+-                name=str('functorch._C'),
+-                sources=[]),
+-        )
+ 
+     cmdclass = {
+         'bdist_wheel': wheel_concatenate,

diff --git a/sci-libs/pytorch/pytorch-1.13.1-r1.ebuild 
b/sci-libs/pytorch/pytorch-1.13.1-r2.ebuild
similarity index 97%
rename from sci-libs/pytorch/pytorch-1.13.1-r1.ebuild
rename to sci-libs/pytorch/pytorch-1.13.1-r2.ebuild
index 956c5e89cbc8..f93b9a108820 100644
--- a/sci-libs/pytorch/pytorch-1.13.1-r1.ebuild
+++ b/sci-libs/pytorch/pytorch-1.13.1-r2.ebuild
@@ -39,6 +39,7 @@ src_prepare() {
                "${FILESDIR}"/${P}-global-dlopen.patch \
                "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \
                "${FILESDIR}"/${PN}-1.13.0-setup.patch \
+               "${FILESDIR}"/${P}-emptyso.patch \
 
        # Set build dir for pytorch's setup
        sed -i \

Reply via email to