Merge pull request #105772 from danieldk/pytorch-fixup-cmake
python3Packages.pytorch: Fix CMake files for split outputs
This commit is contained in:
commit
ac5bd14ce2
@ -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