py-torch: fix python_platlib reference (#28565)
This commit is contained in:
parent
728ac61bd8
commit
a4a23ff713
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue