diff options
author | Robert Underwood <robertu94@users.noreply.github.com> | 2024-09-24 10:47:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 16:47:01 +0200 |
commit | befbbec2b33a53203b42b2359a77dfd2cf345731 (patch) | |
tree | 3557a7c56f7fb16ed759738526c71a9e385824c2 | |
parent | f0e51a35c7fea3db5151a573c4ae85b33d96d06b (diff) | |
download | spack-befbbec2b33a53203b42b2359a77dfd2cf345731.tar.gz spack-befbbec2b33a53203b42b2359a77dfd2cf345731.tar.bz2 spack-befbbec2b33a53203b42b2359a77dfd2cf345731.tar.xz spack-befbbec2b33a53203b42b2359a77dfd2cf345731.zip |
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>
-rw-r--r-- | var/spack/repos/builtin/packages/py-pybind11/package.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py index 16b0e77a71..b14b50a8e6 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -100,7 +100,10 @@ class PyPybind11(CMakePackage, PythonExtension): 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) |