Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta python merge #429

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
python3-pytest-html \
python3-pytest-metadata \
python3-pytest-runner \
python3-pytest-subtests \
python3-pytest-tempdir \
python3-pytest-timeout \
python3-pythonping \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/setup.py b/setup.py
index 9a507c6c4..3f5b70866 100644
--- a/setup.py
+++ b/setup.py
@@ -680,7 +680,18 @@ def determine_gl_flags():
c_options['use_x11'] = True
c_options['use_egl'] = True
else:
- flags['libraries'] = ['GL']
+ if cross_sysroot:
+ flags['include_dirs'] = [cross_sysroot + '/usr/include']
+ flags['library_dirs'] = [cross_sysroot + '/usr/lib']
+
+ if c_options['use_opengl_es2']:
+ print("using GLESv2 libraries")
+ flags['libraries'] = ['GLESv2']
+ else:
+ flags['libraries'] = ['GL']
+
+
+ print("cross_sysroot: " + str(cross_sysroot))
return flags, base_flags


71 changes: 71 additions & 0 deletions meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
SUMMARY = "Open source Python library for rapid development of applications \
that make use of innovative user interfaces, such as multi-touch apps."
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, RPi,
# 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
# Also, if using SDL2 as backend, SDL2 needs to be configured wth gles
SRC_URI += " \
file://0001-add-support-for-glesv2.patch \
"
SRCREV = "dedcb6bcabe3d8d6758dcee607e8c33b174d782b"

S = "${WORKDIR}/git"

PACKAGES += "${PN}-examples"
FILES:${PN}-examples = "/usr/share/kivy-examples"

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 \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DESCRIPTION = "unittest subTest() support and subtests fixture."

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=242b4e17fa287dcf7aef372f6bc3dcb1"

SRC_URI[sha256sum] = "5bd1e4bf0eda4c89a6cd42b0ee28e1d2ca0848de3fd67ad8cdd6d559ed00f120"

inherit pypi setuptools3

DEPENDS += "${PYTHON_PN}-setuptools-scm-native"

RDEPENDS:${PN} += " \
${PYTHON_PN}-pytest \
"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=f0a3e4a2554ebb89c0

inherit pypi setuptools3

SRC_URI[sha256sum] = "e9700c52749cb3e90c98efd72b730c97b7e4962992fca5fbcaf1363be8e3b849"
SRC_URI[sha256sum] = "f585cbbeecb35f35609edccb95efd95a3e35824cd7752b586503f7e6087303f1"

RDEPENDS:${PN} += " \
python3-stringold \
Expand Down