python3-scikit-build: New recipe
PATCH v2 1/3 python3-scikit-build: New recipe
Used by python3-cmake and python3-ninja.
---
v2: Fixed BBCLASSEXTEND
.../python/python3-scikit-build_0.16.7.bb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb
meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb new file +21 -0
@@ -0,0 +1,21 @@ +SUMMARY = "Improved build system generator for Python C/C++/Fortran/Cython extensions" +LICENSE = "MIT & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c96d2b08b3cec6d3c67fb864d1fd8cc" + +DEPENDS = "python3-setuptools-scm-native" + +PYPI_PACKAGE = "scikit-build" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "a9b9cc7479b71e6c8d434596dfade025253aae23adb22a9a2d85850fd51cecfd" + +RDEPENDS:${PN} = " \ + python3-distro \ + python3-packaging \ + python3-setuptools \ + python3-typing-extensions \ + python3-wheel \ + cmake \ +" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.2
PATCH v2 2/3 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.
--- .../python/python3-cmake/CMakeLists.txt | 11 ++++++ .../python3-cmake/run-cmake-from-path.patch | 11 ++++++ .../python/python3-cmake_3.25.2.bb | 37 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt create mode 100644 meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch create mode 100644 meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb
meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt new file +11 -0
@@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.6) + +# +# For more details, see docs/building.rst +# + +project(CMakePythonDistributions NONE) + +install(CODE " + message(STATUS \"Install CMake project\") +")
meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- cmake-3.25.2/src/cmake/__init__.py.old 2023-03-10 09:40:43.582315753 +0100 ++++ cmake-3.25.2/src/cmake/__init__.py 2023-03-10 09:41:38.030874047 +0100 +@@ -36,7 +36,7 @@ + + + def _program(name, args): +- return subprocess.call([os.path.join(CMAKE_BIN_DIR, name)] + args, close_fds=False) ++ return subprocess.call([name] + args, close_fds=False) + + + def cmake():
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file +37 -0
@@ -0,0 +1,37 @@ +SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ + file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ +" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "cmake" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "bcf9f0369743278ec26961542b31ed1610e6f4cfc20c00a3f1c61985abb3b0d2" + +SRC_URI += " \ + file://CMakeLists.txt \ + file://run-cmake-from-path.patch \ +" + +addtask do_patchbuild after do_patch before do_configure + +do_patchbuild () { + rm -f ${S}/CMakeLists.txt + cp ${WORKDIR}/CMakeLists.txt ${S}/ +} + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = " \ + cmake \ + python3-scikit-build \ +" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.2
PATCH v2 3/3 python3-ninja: New recipe
In reply to Zoltán BöszörményiSome python modules rely on "import ninja".
Only build and ship the python parts, and don't download and build ninja from sources. Use the already built ninja instead.
The CMakeLists.txt file is a crippled copy from this ninja 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 ninja is used from PATH.
--- .../python/python3-ninja/CMakeLists.txt | 9 +++++ .../python3-ninja/run-ninja-from-path.patch | 11 ++++++ .../python/python3-ninja_1.11.1.bb | 34 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt create mode 100644 meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch create mode 100644 meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb
meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt new file +9 -0
@@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(NinjaPythonDistributions) + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH}) + +install(CODE " + message(STATUS \"Install ninja project\") +")
meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- ninja-1.11.1/src/ninja/__init__.py.old 2022-11-05 09:49:23.000000000 +0100 ++++ ninja-1.11.1/src/ninja/__init__.py 2023-03-10 09:45:13.452082888 +0100 +@@ -44,7 +44,7 @@ + + + def _program(name, args): +- return subprocess.call([os.path.join(BIN_DIR, name)] + args, close_fds=False) ++ return subprocess.call([name] + args, close_fds=False) + + + def ninja():
meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb new file +34 -0
@@ -0,0 +1,34 @@ +SUMMARY = "Ninja is a small build system with a focus on speed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "ninja" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "c833a47d39b2d1eee3f9ca886fa1581efd5be6068b82734ac229961ee8748f90" + +SRC_URI += " \ + file://CMakeLists.txt \ + file://run-ninja-from-path.patch \ +" + +addtask do_patchbuild after do_patch before do_configure + +do_patchbuild () { + rm -f ${S}/CMakeLists.txt + cp ${WORKDIR}/CMakeLists.txt ${S}/ +} + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = " \ + ninja \ + python3-scikit-build \ +" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.2
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [oe] [meta-python][PATCH v2 2/3] python3-cmake: New recipe
2023. 03. 10. 14:46 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 30 lines
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 <[email protected]>--- .../python/python3-cmake/CMakeLists.txt | 11 ++++++ .../python3-cmake/run-cmake-from-path.patch | 11 ++++++ .../python/python3-cmake_3.25.2.bb | 37 +++++++++++++++++++ 3 files changed, 59 insertions(+)create mode 100644
meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txtcreate mode 100644meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patchcreate mode 100644 meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb...
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file +1
-0@@ -0,0 +1,37 @@ +SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software"
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb line 11
Quoted 10 lines
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file +10
-0+LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ + file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ +" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "cmake" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-"
This line needs the pypi.bbclass change in OE-Core. As far as I can see it not even reached master-next there, while this series was merged into meta-openembedded master-next.
As is, it will cause bad checksum warnings when building python3-cmake.
Re: [oe] [meta-python][PATCH v2 2/3] python3-cmake: New recipe
There are several 'master-next' branches, each integrator maintains their own.
The pypi patch did make it into
https://git.yoctoproject.org/poky-contrib/log/?h=abelloni/master-next
Alex
Quoted 59 lines · Zoltan Boszormenyi
2023. 03. 10. 14:46 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 30 lines
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 <[email protected]>--- .../python/python3-cmake/CMakeLists.txt | 11 ++++++ .../python3-cmake/run-cmake-from-path.patch | 11 ++++++ .../python/python3-cmake_3.25.2.bb | 37 +++++++++++++++++++ 3 files changed, 59 insertions(+)create mode 100644
meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txtcreate mode 100644meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patchcreate mode 100644 meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb...
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file +1
-0@@ -0,0 +1,37 @@ +SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software"meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb line 11
Quoted 10 lines
meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file +10
-0+LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ + file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ +" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "cmake" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-"This line needs the pypi.bbclass change in OE-Core. As far as I can see it not even reached master-next there, while this series was merged into meta-openembedded master-next.
As is, it will cause bad checksum warnings when building python3-cmake.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101504): https://lists.openembedded.org/g/openembedded-devel/message/101504
Mute This Topic: https://lists.openembedded.org/mt/97536763/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-