git: aa9736e3e5f6 - main - python.mk: Improve CMake/Python integration
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 Sep 2023 17:22:01 UTC
The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=aa9736e3e5f6856f5eb5e26837169b0f6022eec8 commit aa9736e3e5f6856f5eb5e26837169b0f6022eec8 Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2023-09-04 16:23:06 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2023-09-04 17:21:35 +0000 python.mk: Improve CMake/Python integration Suport FindPython.cmake, FindPython3.cmake, FindPython2.cmake modules by adding Python{,2,3}_EXECUTABLE to CMAKE_ARGS in python.mk. CMake supports more than one way to search for python. Currently python.mk passes -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} to help FindPython{Interp,Libs}.cmake modules "find" the version of python that a port build wants to use. The FindPython{,2,3}.cmake modules don't know anything about Python_ADDITIONAL_VERSIONS but use Python{,2,3}_EXECUTABLE as the hint. PR: 262109 --- Mk/Uses/python.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 179cdd2c1d0a..1665683f0827 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -771,6 +771,8 @@ CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" # By default CMake picks up the highest available version of Python package. # Enforce the version required by the port or the default. CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} +CMAKE_ARGS+= -DPython_EXECUTABLE:FILEPATH="${PYTHON_CMD}" +CMAKE_ARGS+= -DPython${PYTHON_MAJOR_VER}_EXECUTABLE:FILEPATH="${PYTHON_CMD}" # Python 3rd-party modules PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR}