diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2023-06-26 04:31:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 11:31:48 +0200 |
commit | ce0b9ea8cf184c9048cac1ae88f2d69f0e4520c7 (patch) | |
tree | 4564ee74a70dcdb9b74c0f025a414ea033e0c0ad | |
parent | c560053c39cc1e67136c60d5ed8b34d986f61eb7 (diff) | |
download | spack-ce0b9ea8cf184c9048cac1ae88f2d69f0e4520c7.tar.gz spack-ce0b9ea8cf184c9048cac1ae88f2d69f0e4520c7.tar.bz2 spack-ce0b9ea8cf184c9048cac1ae88f2d69f0e4520c7.tar.xz spack-ce0b9ea8cf184c9048cac1ae88f2d69f0e4520c7.zip |
acts: ensure Python_EXECUTABLE uses ^python when +python (#38540)
By default, `find_package(Python)` searches from highest version to lowest version, identifying the highest version that satisfies the requirements. This means that `/usr/bin/python3.11` will be found before `$(spack location -i python)/bin/python3.10`, even when other packages have been built with the `python` in spack.
This ensures that the `python` dependency is explicitly the `python` version that is used.
-rw-r--r-- | var/spack/repos/builtin/packages/acts/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 6d0ad04e21..624e03cfae 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -391,4 +391,8 @@ class Acts(CMakePackage, CudaPackage): cxxstd = spec["root"].variants["cxxstd"].value args.append("-DCMAKE_CXX_STANDARD={0}".format(cxxstd)) + if "+python" in spec: + python = spec["python"].command.path + args.append("-DPython_EXECUTABLE={0}".format(python)) + return args |