Skip to contentSkip to conversation

python-kivy: new package

PATCH Superseded Joseph Kogut 2 participants 3 messages Aug 30, 2018

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 python-kivy: new package

---
Changes v3 -> v4:
- Remove dependency on glibc (tested on aarch64 w/ musl and X11 window provider, sdl2 still segfaults)
- Fix dependency on xlib_libX11 and xlib_libXrender

Changes v2 -> v3:
- Bump version to 1.10.1
- Remove upstreamed patch to remove getconf dependency
- Split config comments for OpenGL and glibc deps
- check-packages fixes

Changes v1 -> v2:
- Remove unnecessary build dependencies (suggested by Yegor)
- Require toolchain w/ glibc, as Kivy builds with others, but seems to segfault with (at least) musl.

---
 DEVELOPERS                           | 12 ++++++-
 package/Config.in                    |  1 +
 package/python-kivy/Config.in        | 16 ++++++++++
 package/python-kivy/python-kivy.hash |  4 +++
 package/python-kivy/python-kivy.mk   | 48 ++++++++++++++++++++++++++++
 5 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 package/python-kivy/Config.in
 create mode 100644 package/python-kivy/python-kivy.hash
 create mode 100644 package/python-kivy/python-kivy.mk
DEVELOPERS +11 -1
index bd8095bd20..1792af78fb 100644
@@ -1,4 +1,4 @@
-# Syntax:
+	# Syntax:
 #
 # N:	Firstname Lastname <email>
 # F:	file pattern or directory
@@ -1027,6 +1027,16 @@ F:	package/pdbg/
 F:	board/qemu/ppc64le-pseries/
 F:	configs/qemu_ppc64le_pseries_defconfig
 
+N:	Joseph Kogut <[email protected]>
+F:	package/gconf/
+F:	package/libnss/
+F:	package/python-cython/
+F:	package/python-kivy/
+F:	package/python-raven/
+F:	package/python-schedule/
+F:	package/python-websockets/
+F:	package/python-xlib/
+
 N:	Johan Derycke <[email protected]>
 F:	package/python-libconfig/
 
package/Config.in +1 -0
index 66f303ec58..1f873bf3b0 100644
@@ -859,6 +859,7 @@ menu "External python modules"
 	source "package/python-jsonschema/Config.in"
 	source "package/python-json-schema-validator/Config.in"
 	source "package/python-keyring/Config.in"
+	source "package/python-kivy/Config.in"
 	source "package/python-libconfig/Config.in"
 	source "package/python-libusb1/Config.in"
 	source "package/python-lmdb/Config.in"
package/python-kivy/Config.in new file +16 -0
new file mode 100644
index 0000000000..e4b89a74c1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_PYTHON_KIVY
+	bool "python-kivy"
+	depends on BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_HOST_PYTHON_CYTHON
+	select BR2_PACKAGE_LIBPNG # runtime
+	select BR2_PACKAGE_MTDEV # runtime
+	select BR2_PACKAGE_PYTHON_DOCUTILS # runtime
+	select BR2_PACKAGE_PYTHON_PYGMENTS # runtime
+	help
+	  A software library for rapid development of
+	  hardware-accelerated multitouch applications.
+
+	  http://kivy.org
+
+comment "python-kivy needs an OpenGL provider"
+	depends on !BR2_PACKAGE_HAS_LIBGL
package/python-kivy/python-kivy.hash new file +4 -0
new file mode 100644
index 0000000000..8949bc643f
@@ -0,0 +1,4 @@
+# sha256 locally computed
+sha256	794e45cc7bcc7882f7cd95f1673bc6701f3215a20a54c915cac0c5e46a449b4c  python-kivy-1.10.1.tar.gz
+# License file, locally calculated
+sha256	282b3d8735ef6cbdcf8cc480947d50e0aea4ad1cc931d41f3f6a6bc23956f2d6  LICENSE
package/python-kivy/python-kivy.mk new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.18.0
#1 lore raw

PATCH v4 1/1 python-kivy: new package

Hello Joseph,

Quoted 3 lines · Joseph Kogut

Changes v3 -> v4:
- Remove dependency on glibc (tested on aarch64 w/ musl and X11 window provider, sdl2 still segfaults)

segfault at runtime or build time ?

DEVELOPERS line 1

Quoted 7 lines
DEVELOPERS +1 -1
index bd8095bd20..1792af78fb 100644
@@ -1,4 +1,4 @@
-# Syntax:
+	# Syntax:

Spurious change.

Quoted 6 lines
DEVELOPERS +0 -0
 #
 # N:	Firstname Lastname <email>
 # F:	file pattern or directory
@@ -1027,6 +1027,16 @@ F:	package/pdbg/
 F:	board/qemu/ppc64le-pseries/
 F:	configs/qemu_ppc64le_pseries_defconfig

DEVELOPERS F: package/pdbg/ · line 1038

Quoted 10 lines
DEVELOPERS +9 -0
 
+N:	Joseph Kogut <[email protected]>
+F:	package/gconf/
+F:	package/libnss/
+F:	package/python-cython/
+F:	package/python-kivy/
+F:	package/python-raven/
+F:	package/python-schedule/
+F:	package/python-websockets/
+F:	package/python-xlib/

Lots of unrelated changes in here. In this commit, you should only be adding an entry for package/python-kivy/. If you want to appear in the DEVELOPERS file for other packages, send a separate patch for that.

package/python-kivy/Config.in line 4

Quoted 10 lines
package/python-kivy/Config.in new file +4 -0
new file mode 100644
index 0000000000..e4b89a74c1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_PYTHON_KIVY
+	bool "python-kivy"
+	depends on BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_HOST_PYTHON_CYTHON

Is Cython a mandatory dependency, or an optional one like with python-falcon ?

package/python-kivy/Config.in line 6

Quoted 2 lines
package/python-kivy/Config.in new file +2 -0
+	select BR2_PACKAGE_LIBPNG # runtime
+	select BR2_PACKAGE_MTDEV # runtime

Are you sure these are really runtime dependencies ? They are dlopen'ed at runtime ?

Quoted 23 lines
package/python-kivy/python-kivy.hash new file +4 -0
new file mode 100644
index 0000000000..8949bc643f
@@ -0,0 +1,4 @@
+# sha256 locally computed
+sha256	794e45cc7bcc7882f7cd95f1673bc6701f3215a20a54c915cac0c5e46a449b4c  python-kivy-1.10.1.tar.gz
+# License file, locally calculated
+sha256	282b3d8735ef6cbdcf8cc480947d50e0aea4ad1cc931d41f3f6a6bc23956f2d6  LICENSE
package/python-kivy/python-kivy.mk new file +7 -0
new file mode 100644
index 0000000000..fbb80c59cd
@@ -0,0 +1,48 @@
+################################################################################
+#
+# python-kivy
+#
+################################################################################
+
+PYTHON_KIVY_VERSION = 1.10.1

package/python-kivy/python-kivy.mk line 17

Quoted 10 lines
package/python-kivy/python-kivy.mk new file +10 -0
+PYTHON_KIVY_SITE = $(call github,kivy,kivy,$(PYTHON_KIVY_VERSION))
+PYTHON_KIVY_SETUP_TYPE = distutils
+PYTHON_KIVY_LICENSE = MIT
+PYTHON_KIVY_LICENSE_FILES = LICENSE
+PYTHON_KIVY_DEPENDENCIES = host-python-cython libgl
+
+ifeq ($(BR2_PACKAGE_GSTREAMER),y)
+PYTHON_KIVY_DEPENDENCIES += gstreamer
+PYTHON_KIVY_ENV += USE_GSTREAMER=1
+endif

Perhaps an explicit USE_GSTREAMER=0 in an "else" condition would be good. Ditto for all other options: we generally try to explicitly disable features.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v4 1/1 python-kivy: new package

Hi Thomas,

Quoted 11 lines · Thomas Petazzoni

Hello Joseph,

Quoted 3 lines · Joseph Kogut

Changes v3 -> v4:
- Remove dependency on glibc (tested on aarch64 w/ musl and X11 window provider, sdl2 still segfaults)

segfault at runtime or build time ?

Runtime, and only with the SDL2 window provider. Specifying the X11 window provider with the KIVY_WINDOW=x11 environment variable works fine, assuming Kivy was built with USE_X11=1.

I have a core dump, but haven't looked at it yet. I suspect few, if any people have tried using Kivy and SDL2 with Musl. The SDL2 window provider works fine with glibc.

Quoted 17 lines

DEVELOPERS line 1

Quoted 7 lines
DEVELOPERS +1 -1
index bd8095bd20..1792af78fb 100644
@@ -1,4 +1,4 @@
-# Syntax:
+     # Syntax:

Spurious change.

Quoted 7 lines
DEVELOPERS +0 -0
 #
 # N: Firstname Lastname <email>
 # F: file pattern or directory
@@ -1027,6 +1027,16 @@ F:     package/pdbg/
 F:   board/qemu/ppc64le-pseries/
 F:   configs/qemu_ppc64le_pseries_defconfig
 
Quoted 14 lines

DEVELOPERS F: package/pdbg/ · line 1038

Quoted 9 lines
DEVELOPERS +9 -0
+N:   Joseph Kogut <[email protected]>
+F:   package/gconf/
+F:   package/libnss/
+F:   package/python-cython/
+F:   package/python-kivy/
+F:   package/python-raven/
+F:   package/python-schedule/
+F:   package/python-websockets/
+F:   package/python-xlib/

Lots of unrelated changes in here. In this commit, you should only be adding an entry for package/python-kivy/. If you want to appear in the DEVELOPERS file for other packages, send a separate patch for that.

Whoah, I'm not sure how I missed this. I'm already added as a developer for these packages and more, and I rebased on next. I think I must've not been paying attention when I was resolving conflicts. Sorry!

Quoted 15 lines

package/python-kivy/Config.in line 4

Quoted 11 lines
package/python-kivy/Config.in new file +4 -0
new file mode 100644
index 0000000000..e4b89a74c1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_PYTHON_KIVY
+     bool "python-kivy"
+     depends on BR2_PACKAGE_HAS_LIBGL
+     select BR2_PACKAGE_HOST_PYTHON_CYTHON

Is Cython a mandatory dependency, or an optional one like with python-falcon ?

It's mandatory, Kivy doesn't have Python only alternatives for its Cython extensions.

Quoted 6 lines

package/python-kivy/Config.in line 6

Quoted 2 lines
package/python-kivy/Config.in new file +2 -0
+     select BR2_PACKAGE_LIBPNG # runtime
+     select BR2_PACKAGE_MTDEV # runtime

Are you sure these are really runtime dependencies ? They are dlopen'ed at runtime ?

Mtdev is dlopened here:
https://github.com/kivy/kivy/blob/master/kivy/lib/mtdev.py

Libpng doesn't appear to be explicitly linked or dlopened anywhere, but the SDL2 text provider is indeed linked to it:

build/lib.linux-x86_64-3.6/kivy/core/text/_text_sdl2.cpython-36m-x86_64-linux-gnu.so

    linux-vdso.so.1 (0x00007ffe52952000)
    libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007f8a8b8d7000)
    libSDL2_ttf-2.0.so.0 => /usr/lib/libSDL2_ttf-2.0.so.0 (0x00007f8a8b6cf000)
    libpython3.6m.so.1.0 => not found
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8a8b6ae000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f8a8b4ea000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007f8a8b365000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8a8b35e000)
    librt.so.1 => /usr/lib/librt.so.1 (0x00007f8a8b354000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f8a8b08b000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8a8be6b000)
    libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f8a8ae7b000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f8a8ac45000)
Quoted 29 lines
Quoted 29 lines
package/python-kivy/python-kivy.hash new file +4 -0
new file mode 100644
index 0000000000..8949bc643f
@@ -0,0 +1,4 @@
+# sha256 locally computed
+sha256       794e45cc7bcc7882f7cd95f1673bc6701f3215a20a54c915cac0c5e46a449b4c  python-kivy-1.10.1.tar.gz
+# License file, locally calculated
+sha256       282b3d8735ef6cbdcf8cc480947d50e0aea4ad1cc931d41f3f6a6bc23956f2d6  LICENSE
package/python-kivy/python-kivy.mk new file +13 -0
new file mode 100644
index 0000000000..fbb80c59cd
@@ -0,0 +1,48 @@
+################################################################################
+#
+# python-kivy
+#
+################################################################################
+
+PYTHON_KIVY_VERSION = 1.10.1
+PYTHON_KIVY_SITE = $(call github,kivy,kivy,$(PYTHON_KIVY_VERSION))
+PYTHON_KIVY_SETUP_TYPE = distutils
+PYTHON_KIVY_LICENSE = MIT
+PYTHON_KIVY_LICENSE_FILES = LICENSE
+PYTHON_KIVY_DEPENDENCIES = host-python-cython libgl
+
Quoted 9 lines

package/python-kivy/python-kivy.mk line 17

Quoted 4 lines
package/python-kivy/python-kivy.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_GSTREAMER),y)
+PYTHON_KIVY_DEPENDENCIES += gstreamer
+PYTHON_KIVY_ENV += USE_GSTREAMER=1
+endif

Perhaps an explicit USE_GSTREAMER=0 in an "else" condition would be good. Ditto for all other options: we generally try to explicitly disable features.

Will do.

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Thanks,
Joseph