summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2023-04-19 16:12:45 -0500
committerGitHub <noreply@github.com>2023-04-19 17:12:45 -0400
commitc7508dc21625b80b0fc6a4b835f0a6fdd38480d3 (patch)
tree21e26ecafc416a150319a09cd948aecc7707f300 /var
parent6ca41cfbcb9c8c526843f7302e28ea67cbdc2430 (diff)
downloadspack-c7508dc21625b80b0fc6a4b835f0a6fdd38480d3.tar.gz
spack-c7508dc21625b80b0fc6a4b835f0a6fdd38480d3.tar.bz2
spack-c7508dc21625b80b0fc6a4b835f0a6fdd38480d3.tar.xz
spack-c7508dc21625b80b0fc6a4b835f0a6fdd38480d3.zip
py-torch: define property cmake_prefix_paths (#37012)
* py-torch: define property cmake_prefix_paths `py-torch` installs `libtorch` and a cmake config in a non-standard location. This points downstream code to the relevant locations. From there it should pick up the correctly library and include paths for C++ projects. * py-torch: python_platlib suggestion Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * [@spackbot] updating style on behalf of wdconinc * py-torch: back to self.spec["python"].package.platlib * [@spackbot] updating style on behalf of wdconinc --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index c0e3d01254..63f9218dc7 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -606,3 +606,10 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
def install_test(self):
with working_dir("test"):
python("run_test.py")
+
+ @property
+ def cmake_prefix_paths(self):
+ cmake_prefix_paths = [
+ join_path(self.prefix, self.spec["python"].package.platlib, "torch", "share", "cmake")
+ ]
+ return cmake_prefix_paths