Skip to content

Commit

Permalink
Merge pull request #105772 from danieldk/pytorch-fixup-cmake
Browse files Browse the repository at this point in the history
python3Packages.pytorch: Fix CMake files for split outputs
  • Loading branch information
danieldk committed Dec 4, 2020
2 parents 3a3e8e6 + 7e629cc commit ac5bd14
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/python-modules/pytorch/default.nix
Expand Up @@ -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
'';
Expand Down

0 comments on commit ac5bd14

Please sign in to comment.