Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-torch for openSUSE:Factory checked in at 2026-07-14 13:47:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-torch (Old) and /work/SRC/openSUSE:Factory/.python-torch.new.1991 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-torch" Tue Jul 14 13:47:10 2026 rev:10 rq:1365345 version:2.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-torch/python-torch.changes 2026-06-16 14:02:05.394849995 +0200 +++ /work/SRC/openSUSE:Factory/.python-torch.new.1991/python-torch.changes 2026-07-14 13:47:33.730136801 +0200 @@ -1,0 +2,11 @@ +Mon Jul 13 07:57:40 UTC 2026 - Martin Pluskal <[email protected]> + +- Fix Caffe2Targets.cmake / find_package(Torch) referencing + libc10/libtorch/libtorch_cpu at the pre-move site-packages path, + which broke every downstream C++ torch consumer: after the + libraries are moved to %{_libdir} for the separate libtorch + package, ship compatibility symlinks under torch/lib so the + relative CMake config (${_IMPORT_PREFIX}/lib and + ${TORCH_INSTALL_PREFIX}/lib) resolves again. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-torch.spec ++++++ --- /var/tmp/diff_new_pack.kLZwGe/_old 2026-07-14 13:47:36.266222743 +0200 +++ /var/tmp/diff_new_pack.kLZwGe/_new 2026-07-14 13:47:36.270222879 +0200 @@ -321,6 +321,14 @@ %python_expand rm -f %{buildroot}%{$python_sitearch}/torch/lib/libtorch.so* %python_expand rm -f %{buildroot}%{$python_sitearch}/torch/lib/libtorch_cpu.so* %python_expand rm -f %{buildroot}%{$python_sitearch}/torch/lib/libc10.so* +# The shipped CMake package config (Caffe2Targets*.cmake, TorchConfig.cmake) +# references these libraries relative to the torch/ install prefix +# (${_IMPORT_PREFIX}/lib/lib*.so and find_library(... PATHS ${TORCH_INSTALL_PREFIX}/lib)). +# Recreate them as symlinks to the moved libraries in %{_libdir} so that +# find_package(Torch) resolves for downstream C++ consumers. +%python_expand ln -sf %{_libdir}/libtorch.so %{buildroot}%{$python_sitearch}/torch/lib/libtorch.so +%python_expand ln -sf %{_libdir}/libtorch_cpu.so %{buildroot}%{$python_sitearch}/torch/lib/libtorch_cpu.so +%python_expand ln -sf %{_libdir}/libc10.so %{buildroot}%{$python_sitearch}/torch/lib/libc10.so %python_clone -a %{buildroot}%{_bindir}/torchrun @@ -353,10 +361,9 @@ %exclude %{python_sitearch}/torchgen/packaged/ATen/templates %exclude %{python_sitearch}/torchgen/packaged/autograd/templates %exclude %{python_sitearch}/torch-devel -# libtorch libraries are in the separate libtorch package -%exclude %{python_sitearch}/torch/lib/libtorch.so* -%exclude %{python_sitearch}/torch/lib/libtorch_cpu.so* -%exclude %{python_sitearch}/torch/lib/libc10.so* +# The real libtorch libraries live in the separate libtorch package; the main +# package ships only compatibility symlinks under torch/lib pointing at +# %{_libdir} so the shipped CMake config resolves for downstream consumers. %python_alternative %{_bindir}/torchrun %files %{python_files devel}
