commit: 69be8c558df47036c3faefc85fb42c45ff3e7ab5 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> AuthorDate: Wed Jul 2 07:24:19 2025 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Wed Jul 2 07:24:42 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69be8c55
sci-ml/pytorch: drop 2.4.1-r3 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> sci-ml/pytorch/Manifest | 1 - sci-ml/pytorch/files/pytorch-1.13.0-setup.patch | 11 ---- ...ibrary-directory-according-to-CMake-build.patch | 32 ----------- sci-ml/pytorch/files/pytorch-2.2.1-emptyso.patch | 13 ----- .../files/pytorch-2.4.0-dontbuildagain.patch | 17 ------ .../files/pytorch-2.4.0-global-dlopen.patch | 20 ------- .../files/pytorch-2.4.0-torch_shm_manager.patch | 11 ---- sci-ml/pytorch/pytorch-2.4.1-r3.ebuild | 66 ---------------------- 8 files changed, 171 deletions(-) diff --git a/sci-ml/pytorch/Manifest b/sci-ml/pytorch/Manifest index fa8a968b13ff..c9a5bc44aa54 100644 --- a/sci-ml/pytorch/Manifest +++ b/sci-ml/pytorch/Manifest @@ -1,4 +1,3 @@ -DIST pytorch-2.4.1.tar.gz 115029469 BLAKE2B c2909ff27d527bc57cba56b780d3b8cd07a043ab045caa6c6b27857a16f9ad10aaab2116b26226b1e46ee08ffb44007965d914464418e4ae14ca48c3f3f383bb SHA512 7e9b4485e242eaf0d648765c6621d73d95e7107b766646a098175436d1ab2e2b864badd0757a3bab6b7c318233f2120bad9ac07b39bb9e357897919580c87631 DIST pytorch-2.5.1.tar.gz 116091366 BLAKE2B 7838b17562b94ffc7d798031348689db607dd5eae2a3c35be365972e2b52a2c1b12067068d5aca5ab00cf0977d9c2c3c9ae5337d69534c864c732e6256cbeef6 SHA512 a913a466324a65fa3d79c5e9ad4d605fc7976f0134fda2f81aaa3cea29d56926604999b8a238759646d211e63b47bbb446cdffa86ca8defd8159f11e30301289 DIST pytorch-2.6.0.tar.gz 119594438 BLAKE2B 3152eb341cf42295e147e59625beb9c06608aa4b78f9618c1c0024b10c1c767715d07fe8c4be52d029ac47f808cd0d5e65c9530ec90d951a64b993083b4067ad SHA512 a70da80ff09d226085e18228132cf6bb236ad8cc47eed52375d0d2a615f09dd33849da947270b5670c184eab60cb8e2adf11d801babfbda7aa621400501d07b0 DIST pytorch-2.7.0.tar.gz 50197290 BLAKE2B 2a317d1e9b0d8876f1593382246cd9f786eff3c1b8602353c5e0010dc8414720c5de61886361843a0c33268830c784963a89b410b361e1b67636e652f6a6a2eb SHA512 63eb0363ea68d23567f5524ee8b51756d9302bbe1cbefa367335ab5ebe652523dba75fa417ea3e7eedfc67aa4bef1434c8b7e3dfde2152061b91b6e489763a55 diff --git a/sci-ml/pytorch/files/pytorch-1.13.0-setup.patch b/sci-ml/pytorch/files/pytorch-1.13.0-setup.patch deleted file mode 100644 index bc5721e5b932..000000000000 --- a/sci-ml/pytorch/files/pytorch-1.13.0-setup.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py 2023-02-14 19:34:56.327571750 +0100 -+++ b/setup.py 2023-02-14 19:35:31.073020464 +0100 -@@ -234,6 +234,8 @@ - import time - import sysconfig - -+sys.path[:0] = os.getcwd() -+ - from tools.build_pytorch_libs import build_caffe2 - from tools.setup_helpers.env import (IS_WINDOWS, IS_DARWIN, IS_LINUX, - build_type) diff --git a/sci-ml/pytorch/files/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch b/sci-ml/pytorch/files/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch deleted file mode 100644 index 214267487c95..000000000000 --- a/sci-ml/pytorch/files/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 52019a3f395e5fa97b26d424152d91f73b400f8e Mon Sep 17 00:00:00 2001 -From: Alexey Chernov <[email protected]> -Date: Wed, 13 Nov 2019 23:44:12 +0300 -Subject: [PATCH 5/5] Change library directory according to CMake build -Modified: Tue, 03 Aug 2021, fit for pytorch-1.9.0 - -Change `lib_path` in favour of out-of-tree CMake build -directory, so that all the C++ libraries be found. ---- - setup.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index 60502b6add..cbced52192 100644 ---- a/setup.py -+++ b/setup.py -@@ -268,9 +268,10 @@ else: - - # Constant known variables used throughout this file - cwd = os.path.dirname(os.path.abspath(__file__)) --lib_path = os.path.join(cwd, "torch", "lib") -+cmake_build_dir = os.environ.get("CMAKE_BUILD_DIR", os.path.join(cwd, "build")) -+lib_path = os.path.join(cmake_build_dir, "lib") - third_party_path = os.path.join(cwd, "third_party") --caffe2_build_dir = os.path.join(cwd, "build") -+caffe2_build_dir = cmake_build_dir - - # CMAKE: full path to python library - if IS_WINDOWS: --- -2.23.0 - diff --git a/sci-ml/pytorch/files/pytorch-2.2.1-emptyso.patch b/sci-ml/pytorch/files/pytorch-2.2.1-emptyso.patch deleted file mode 100644 index 2b4839baec5b..000000000000 --- a/sci-ml/pytorch/files/pytorch-2.2.1-emptyso.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/setup.py 2024-03-08 19:34:42.148677983 +0100 -+++ b/setup.py 2024-03-08 19:34:52.402558423 +0100 -@@ -1019,10 +1019,6 @@ - extensions.append( - Extension(name="caffe2.python.caffe2_pybind11_state_hip", sources=[]), - ) -- if cmake_cache_vars["BUILD_FUNCTORCH"]: -- extensions.append( -- Extension(name="functorch._C", sources=[]), -- ) - - cmdclass = { - "bdist_wheel": wheel_concatenate, diff --git a/sci-ml/pytorch/files/pytorch-2.4.0-dontbuildagain.patch b/sci-ml/pytorch/files/pytorch-2.4.0-dontbuildagain.patch deleted file mode 100644 index 4fe5b0bdeb86..000000000000 --- a/sci-ml/pytorch/files/pytorch-2.4.0-dontbuildagain.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -473,14 +473,6 @@ def build_deps(): - check_pydep("yaml", "pyyaml") - build_python = not BUILD_LIBTORCH_WHL - -- build_caffe2( -- version=version, -- cmake_python_library=cmake_python_library, -- build_python=build_python, -- rerun_cmake=RERUN_CMAKE, -- cmake_only=CMAKE_ONLY, -- cmake=cmake, -- ) - - if CMAKE_ONLY: - report( diff --git a/sci-ml/pytorch/files/pytorch-2.4.0-global-dlopen.patch b/sci-ml/pytorch/files/pytorch-2.4.0-global-dlopen.patch deleted file mode 100644 index e72ed94e6888..000000000000 --- a/sci-ml/pytorch/files/pytorch-2.4.0-global-dlopen.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/torch/__init__.py -+++ b/torch/__init__.py -@@ -223,7 +223,7 @@ def _load_global_deps() -> None: - if library_path: - global_deps_lib_path = os.path.join(library_path, 'lib', lib_name) - try: -- ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL) -+ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL) - except OSError as err: - # Can only happen for wheel with cuda libs as PYPI deps - # As PyTorch is not purelib, but nvidia-*-cu12 is -@@ -245,7 +245,7 @@ def _load_global_deps() -> None: - raise err - for lib_folder, lib_name in cuda_libs.items(): - _preload_cuda_deps(lib_folder, lib_name) -- ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL) -+ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL) - - if library_path: - # loading libtorch_global_deps first due its special logic diff --git a/sci-ml/pytorch/files/pytorch-2.4.0-torch_shm_manager.patch b/sci-ml/pytorch/files/pytorch-2.4.0-torch_shm_manager.patch deleted file mode 100644 index b1303d141dce..000000000000 --- a/sci-ml/pytorch/files/pytorch-2.4.0-torch_shm_manager.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/torch/__init__.py -+++ b/torch/__init__.py -@@ -1691,7 +1691,7 @@ py_float = float - py_int = int - - # Shared memory manager needs to know the exact location of manager executable --_C._initExtension(_manager_path()) -+_C._initExtension(b"/usr/bin/torch_shm_manager") - del _manager_path - - # Appease the type checker: it can't deal with direct setting of globals(). diff --git a/sci-ml/pytorch/pytorch-2.4.1-r3.ebuild b/sci-ml/pytorch/pytorch-2.4.1-r3.ebuild deleted file mode 100644 index 9071008bf955..000000000000 --- a/sci-ml/pytorch/pytorch-2.4.1-r3.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} ) -DISTUTILS_SINGLE_IMPL=1 -DISTUTILS_EXT=1 -inherit distutils-r1 prefix - -DESCRIPTION="Tensors and Dynamic neural networks in Python" -HOMEPAGE="https://pytorch.org/" -SRC_URI="https://github.com/pytorch/${PN}/archive/refs/tags/v${PV}.tar.gz - -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64" -RESTRICT="test" - -REQUIRED_USE=${PYTHON_REQUIRED_USE} -RDEPEND=" - ${PYTHON_DEPS} - ~sci-ml/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}] - $(python_gen_cond_dep ' - dev-python/sympy[${PYTHON_USEDEP}] - dev-python/typing-extensions[${PYTHON_USEDEP}] - ') -" -DEPEND="${RDEPEND} - $(python_gen_cond_dep ' - dev-python/pyyaml[${PYTHON_USEDEP}] - ') -" - -src_prepare() { - eapply \ - "${FILESDIR}"/${PN}-2.4.0-dontbuildagain.patch \ - "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \ - "${FILESDIR}"/${PN}-2.4.0-global-dlopen.patch \ - "${FILESDIR}"/pytorch-2.4.0-torch_shm_manager.patch \ - "${FILESDIR}"/${PN}-1.13.0-setup.patch \ - "${FILESDIR}"/${PN}-2.2.1-emptyso.patch - - # Set build dir for pytorch's setup - sed -i \ - -e "/BUILD_DIR/s|build|/var/lib/caffe2/|" \ - tools/setup_helpers/env.py \ - || die - distutils-r1_src_prepare - - hprefixify tools/setup_helpers/env.py -} - -python_compile() { - PYTORCH_BUILD_VERSION=${PV} \ - PYTORCH_BUILD_NUMBER=0 \ - USE_SYSTEM_LIBS=ON \ - CMAKE_BUILD_DIR="${BUILD_DIR}" \ - distutils-r1_python_compile develop sdist -} - -python_install() { - USE_SYSTEM_LIBS=ON distutils-r1_python_install -}
