Skip to content

Commit

Permalink
py-torch: fix python_platlib reference (spack#28565)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart authored Feb 1, 2022
1 parent 728ac61 commit a4a23ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions var/spack/repos/builtin/packages/py-torch/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4a23ff

Please sign in to comment.