All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][RFC] python3-kivy
@ 2021-08-26  3:04 William Huang
  2021-08-26 17:17 ` [oe] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: William Huang @ 2021-08-26  3:04 UTC (permalink / raw)
  To: openembedded-devel


[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]

Hello,
I would like to request for comments on a Kivy recipe. Not sure how I should include the recipe but I added it as an attachment for now. I've also included a recipe that installs example programs into /usr/share/kivy-examples/examples.

I managed to get it running on a Rockchip rk3399 in a X environment, as well as on a imx8 in a Wayland environment, although I did need to reconfigure libsdl2 to use GLES libraries and remove X11 package in the case of the imx8.

Any feedback would be great! Not sure if the recipe would be good enough to be included in the meta-python layer as well.

Thanks,
William Huang

[-- Attachment #1.2: Type: text/html, Size: 666 bytes --]

[-- Attachment #2: python3-kivy_2.0.0.bb --]
[-- Type: application/octet-stream, Size: 1748 bytes --]

SUMMARY = "Recipie to embedded the Python PiP Package Kivy"
HOMEPAGE = "https://kivy.org/"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c851d60495c7e27225a819e179208a"

inherit setuptools3

SRC_URI = "\
    git://github.com/kivy/kivy.git;protocol=git;\
    "

# Kivy's setup files only look for GLES libraries for android, iOs, Raspberry Pi, and mali-based OS's
# We need to patch the setup file to tell Kivy setup that our machine has GLES libaries installed as well
SRC_URI += " \
    file://0001-add-support-for-glesv2.patch \
"
SRCREV = "dedcb6bcabe3d8d6758dcee607e8c33b174d782b"

S = "${WORKDIR}/git"

USE_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', '0', d)}"
export USE_WAYLAND

# if using Wayland, let's use pure Wayland (and not XWayland)
# so do not build using X11 flag when we detect Wayland
USE_X11 = " \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',  '0', \
       bb.utils.contains('DISTRO_FEATURES', 'x11',      '1', \
                                                        '0', d), d)}"
export USE_X11

# Use OpenGL ES 2.0 library
KIVY_GRAPHICS = "gles"
export KIVY_GRAPHICS

KIVY_CROSS_SYSROOT="${WORKDIR}/recipe-sysroot"
export KIVY_CROSS_SYSROOT

DEPENDS += " \
    gstreamer1.0 \
    gstreamer1.0-python \
    libsdl2 \
    libsdl2-ttf \
    libsdl2-image \
    libsdl2-mixer \
    pango \
    python3 \
    python3-cython-native \
"

RDEPENDS_${PN} = " \
    gstreamer1.0 \
    gstreamer1.0-python \
    libsdl2 \
    libsdl2-ttf \
    libsdl2-image \
    libsdl2-mixer \
    pango \
    python3 \
    python3-docutils \
    python3-fcntl \
    python3-image \
    python3-pillow \
    python3-pygments \
"

# remove kivy-examples
do_install_append() {
    rm -rf ${D}/usr/share
}

[-- Attachment #3: kivy-examples_2.0.0.bb --]
[-- Type: application/octet-stream, Size: 511 bytes --]

SUMMARY = "Recipie to embedded the Python PiP Package Kivy"
HOMEPAGE = "https://kivy.org/"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c851d60495c7e27225a819e179208a"

SRC_URI = "\
    git://github.com/kivy/kivy.git;protocol=git;\
    "
SRCREV = "dedcb6bcabe3d8d6758dcee607e8c33b174d782b"

S = "${WORKDIR}/git"


do_compile() {
}

do_configure() {
}

do_install() {
    install -d ${D}/usr/share/kivy-examples
    cp -r ${S}/examples ${D}/usr/share/kivy-examples
}

FILES_${PN} += "${S}/examples"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-python][RFC] python3-kivy
  2021-08-26  3:04 [meta-python][RFC] python3-kivy William Huang
@ 2021-08-26 17:17 ` Khem Raj
  2021-09-04  6:54   ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2021-08-26 17:17 UTC (permalink / raw)
  To: William Huang, openembedded-devel



On 8/25/21 8:04 PM, William Huang wrote:
> Hello,
> I would like to request for comments on a Kivy recipe. Not sure how I 
> should include the recipe but I added it as an attachment for now. I've 
> also included a recipe that installs example programs into 
> /usr/share/kivy-examples/examples.
> 
> I managed to get it running on a Rockchip rk3399 in a X environment, as 
> well as on a imx8 in a Wayland environment, although I did need to 
> reconfigure libsdl2 to use GLES libraries and remove X11 package in the 
> case of the imx8.
> 
> Any feedback would be great! Not sure if the recipe would be good enough 
> to be included in the meta-python layer as well.
> 

These looks ok on quick look. You could perhaps merge them into a single 
recipe and use PACKAGES to separate out examples into its own output 
package.

Please format it into a patch and email the patch if you want to 
consider it to include into meta-python

> Thanks,
> William Huang
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-python][RFC] python3-kivy
  2021-08-26 17:17 ` [oe] " Khem Raj
@ 2021-09-04  6:54   ` Martin Jansa
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2021-09-04  6:54 UTC (permalink / raw)
  To: Khem Raj; +Cc: William Huang, openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]

The recipe should have x11 and opengl in REQUIRED_DISTRO_FEATURES as it
depends on libsdl2-ttf with such restriction:
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=c9a07b63e3268e4b8d04c6917d8cd131e019e65c

Now world builds without opengl fail with:
ERROR: Nothing PROVIDES 'libsdl2-ttf' (but
meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
DEPENDS on or otherwise requires it)
libsdl2-ttf was skipped: missing required distro feature 'opengl' (not in
DISTRO_FEATURES)
ERROR: Nothing RPROVIDES 'python3-kivy-dev' (but
meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'python3-kivy-dev'
NOTE: Runtime target 'python3-kivy-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python3-kivy-dev']
ERROR: Nothing RPROVIDES 'python3-kivy' (but
meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'python3-kivy'
NOTE: Runtime target 'python3-kivy' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python3-kivy']

I can send a patch for this (and similar restriction in packagegroup in
master-next
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=55a8f21bb495c3f7ec726faade6bf61baea7dff0)
on Monday unless someone else beats me to it.

On Thu, Aug 26, 2021 at 7:17 PM Khem Raj <raj.khem@gmail.com> wrote:

>
>
> On 8/25/21 8:04 PM, William Huang wrote:
> > Hello,
> > I would like to request for comments on a Kivy recipe. Not sure how I
> > should include the recipe but I added it as an attachment for now. I've
> > also included a recipe that installs example programs into
> > /usr/share/kivy-examples/examples.
> >
> > I managed to get it running on a Rockchip rk3399 in a X environment, as
> > well as on a imx8 in a Wayland environment, although I did need to
> > reconfigure libsdl2 to use GLES libraries and remove X11 package in the
> > case of the imx8.
> >
> > Any feedback would be great! Not sure if the recipe would be good enough
> > to be included in the meta-python layer as well.
> >
>
> These looks ok on quick look. You could perhaps merge them into a single
> recipe and use PACKAGES to separate out examples into its own output
> package.
>
> Please format it into a patch and email the patch if you want to
> consider it to include into meta-python
>
> > Thanks,
> > William Huang
> >
> >
> >
> >
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 3593 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-04  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26  3:04 [meta-python][RFC] python3-kivy William Huang
2021-08-26 17:17 ` [oe] " Khem Raj
2021-09-04  6:54   ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.