summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-cmake
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2023-03-10 14:46:36 +0100
committerKhem Raj <raj.khem@gmail.com>2023-03-10 09:01:54 -0800
commit78f2b8c793842388d75ea27e5689c78ac0608363 (patch)
tree35167a60c18f9acca1ef575d7935843d119e34bd /meta-python/recipes-devtools/python/python3-cmake
parentbf6779b62a72269f8cabeb416255c3f75d76d051 (diff)
downloadmeta-openembedded-78f2b8c793842388d75ea27e5689c78ac0608363.tar.gz
python3-cmake: New recipe
Some python modules rely on "import cmake". Only build and ship the python parts, and don't download and build cmake from sources. Use the already built cmake instead. The CMakeLists.txt file is a crippled copy from this cmake python module's sources, removing almost everything, and adding a dummy install target, so do_install() doesn't fail. The python code is patched so cmake is used from PATH. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-cmake')
-rw-r--r--meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt11
-rw-r--r--meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch11
2 files changed, 22 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt b/meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt
new file mode 100644
index 000000000..8ba81970f
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt
@@ -0,0 +1,11 @@
1cmake_minimum_required(VERSION 3.6)
2
3#
4# For more details, see docs/building.rst
5#
6
7project(CMakePythonDistributions NONE)
8
9install(CODE "
10 message(STATUS \"Install CMake project\")
11")
diff --git a/meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch b/meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch
new file mode 100644
index 000000000..5c38fadce
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch
@@ -0,0 +1,11 @@
1--- cmake-3.25.2/src/cmake/__init__.py.old 2023-03-10 09:40:43.582315753 +0100
2+++ cmake-3.25.2/src/cmake/__init__.py 2023-03-10 09:41:38.030874047 +0100
3@@ -36,7 +36,7 @@
4
5
6 def _program(name, args):
7- return subprocess.call([os.path.join(CMAKE_BIN_DIR, name)] + args, close_fds=False)
8+ return subprocess.call([name] + args, close_fds=False)
9
10
11 def cmake():