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:
@@ -100,7 +100,10 @@ def patch(self):
|
|||||||
|
|
||||||
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
|
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
|
||||||
def cmake_args(self):
|
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):
|
def install(self, pkg, spec, prefix):
|
||||||
super().install(pkg, spec, prefix)
|
super().install(pkg, spec, prefix)
|
||||||
|
|||||||
Reference in New Issue
Block a user