summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-07-06 01:53:05 -0500
committerGitHub <noreply@github.com>2021-07-06 08:53:05 +0200
commit9055deea16cdfb8344f2663a61e4603901110e72 (patch)
treef0b2993fdf9b4487365995d31a14bb6f09672da0
parent1e3c012fead57f6b27d6e408710bb165326fba30 (diff)
downloadspack-9055deea16cdfb8344f2663a61e4603901110e72.tar.gz
spack-9055deea16cdfb8344f2663a61e4603901110e72.tar.bz2
spack-9055deea16cdfb8344f2663a61e4603901110e72.tar.xz
spack-9055deea16cdfb8344f2663a61e4603901110e72.zip
py-torch: fix bug in libs/headers attributes (#24624)
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py6
1 files changed, 4 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 065deb08d2..75125cd08c 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -223,12 +223,14 @@ class PyTorch(PythonPackage, CudaPackage):
@property
def libs(self):
- root = join_path(site_packages_dir, 'torch', 'lib')
+ root = join_path(self.prefix, self.spec['python'].package.site_packages_dir,
+ 'torch', 'lib')
return find_libraries('libtorch', root)
@property
def headers(self):
- root = join_path(site_packages_dir, 'torch', 'include')
+ root = join_path(self.prefix, self.spec['python'].package.site_packages_dir,
+ 'torch', 'include')
headers = find_all_headers(root)
headers.directories = [root]
return headers