python3Packages.pytorch: Fix CMake files for split outputs
Fixes #102146
This commit is contained in:
parent
3a2e9d2ac7
commit
7e629cc3ae
@ -254,6 +254,15 @@ in buildPythonPackage rec {
|
||||
cp -r $out/${python.sitePackages}/torch/include $dev/include
|
||||
cp -r $out/${python.sitePackages}/torch/share $dev/share
|
||||
|
||||
# Fix up library paths for split outputs
|
||||
substituteInPlace \
|
||||
$dev/share/cmake/Torch/TorchConfig.cmake \
|
||||
--replace \''${TORCH_INSTALL_PREFIX}/lib "$lib/lib"
|
||||
|
||||
substituteInPlace \
|
||||
$dev/share/cmake/Caffe2/Caffe2Targets-release.cmake \
|
||||
--replace \''${_IMPORT_PREFIX}/lib "$lib/lib"
|
||||
|
||||
mkdir $lib
|
||||
cp -r $out/${python.sitePackages}/torch/lib $lib/lib
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user