summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-02-01 02:44:08 -0600
committerGitHub <noreply@github.com>2022-02-01 09:44:08 +0100
commita4a23ff71336357a564adff19bf69f9f7eba780b (patch)
tree592d475a682223eafd6462e8c8a94f8aa6532f73
parent728ac61bd86c0635f934f186c478fbc4ea1cf4f0 (diff)
downloadspack-a4a23ff71336357a564adff19bf69f9f7eba780b.tar.gz
spack-a4a23ff71336357a564adff19bf69f9f7eba780b.tar.bz2
spack-a4a23ff71336357a564adff19bf69f9f7eba780b.tar.xz
spack-a4a23ff71336357a564adff19bf69f9f7eba780b.zip
py-torch: fix python_platlib reference (#28565)
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index b717d82dba..62f2b0cbf5 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -206,12 +206,18 @@ class PyTorch(PythonPackage, CudaPackage):
@property
def libs(self):
- root = join_path(python_platlib, 'torch', 'lib')
+ # TODO: why doesn't `python_platlib` work here?
+ root = join_path(
+ self.prefix, self.spec['python'].package.platlib, 'torch', 'lib'
+ )
return find_libraries('libtorch', root)
@property
def headers(self):
- root = join_path(python_platlib, 'torch', 'include')
+ # TODO: why doesn't `python_platlib` work here?
+ root = join_path(
+ self.prefix, self.spec['python'].package.platlib, 'torch', 'include'
+ )
headers = find_all_headers(root)
headers.directories = [root]
return headers