diff mbox series

[meta-python,v2,1/3] python3-scikit-build: New recipe

Message ID 20230310134637.108312-1-zboszor@gmail.com
State Under Review
Headers show
Series [meta-python,v2,1/3] python3-scikit-build: New recipe | expand

Commit Message

Böszörményi Zoltán March 10, 2023, 1:46 p.m. UTC
Used by python3-cmake and python3-ninja.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---

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

Comments

Böszörményi Zoltán March 11, 2023, 5:59 a.m. UTC | #1
2023. 03. 10. 14:46 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
> 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>
> ---
>   .../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
>
> ...
>
> diff --git a/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb
> new file mode 100644
> index 000000000..d0e11f9a6
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb
> @@ -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-"

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.
Alexander Kanavin March 12, 2023, 7:23 a.m. UTC | #2
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

On Sat, 11 Mar 2023 at 06:59, Zoltan Boszormenyi <zboszor@gmail.com> wrote:
>
> 2023. 03. 10. 14:46 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
> > 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>
> > ---
> >   .../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
> >
> > ...
> >
> > diff --git a/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb
> > new file mode 100644
> > index 000000000..d0e11f9a6
> > --- /dev/null
> > +++ b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb
> > @@ -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-"
>
> 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: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb b/meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb
new file mode 100644
index 000000000..c033c56ba
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb
@@ -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"