doxygen: fix build issue with external Py3 (#28216)

Doxygen's build system uses CMake's deprecated `FindPythonInterp`,
which can get confused by other `python` executables in the PATH.
See issue: https://github.com/spack/spack/issues/28215
This commit is contained in:
Nils Leif Fischer 2022-01-04 09:10:39 +01:00 committed by GitHub
parent 1b5eaf62de
commit 1250b77607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,3 +103,12 @@ def patch(self):
'set(ICONV_IN_GLIBC FALSE)',
join_path('cmake', 'FindIconv.cmake'),
string=True)
def cmake_args(self):
args = [
# Doxygen's build system uses CMake's deprecated `FindPythonInterp`,
# which can get confused by other `python` executables in the PATH.
# See issue: https://github.com/spack/spack/issues/28215
self.define('PYTHON_EXECUTABLE', self.spec['python'].command.path)
]
return args