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>
This commit is contained in:
parent
6ca41cfbcb
commit
c7508dc216
1 changed files with 7 additions and 0 deletions
|
@ -606,3 +606,10 @@ def build_amd(self):
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue