py-pybind11: set correct prefix in pc files (#46298)
The detection logic for the prefix used in py-bind11 if broken for spack resulting in an empty prefix. However, the package provides an escape hatch in the form of `prefix_for_pc_file`. Use this escape hatch to provide the correct path; spack will always know better than pybind11's CMake. Co-authored-by: Robert Underwood <runderwood@anl.gov>
This commit is contained in:
parent
f0e51a35c7
commit
befbbec2b3
@ -100,7 +100,10 @@ def patch(self):
|
||||
|
||||
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
|
||||
def cmake_args(self):
|
||||
return [self.define("PYBIND11_TEST", self.pkg.run_tests)]
|
||||
return [
|
||||
self.define("PYBIND11_TEST", self.pkg.run_tests),
|
||||
self.define("prefix_for_pc_file", self.prefix),
|
||||
]
|
||||
|
||||
def install(self, pkg, spec, prefix):
|
||||
super().install(pkg, spec, prefix)
|
||||
|
Loading…
Reference in New Issue
Block a user