diff options
Diffstat (limited to 'meta-python/recipes-devtools/python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-kivy/0001-Remove-old-Python-2-long-from-Cython-files-fixes-bui.patch | 63 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-kivy_2.3.1.bb | 1 |
2 files changed, 64 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-kivy/0001-Remove-old-Python-2-long-from-Cython-files-fixes-bui.patch b/meta-python/recipes-devtools/python/python3-kivy/0001-Remove-old-Python-2-long-from-Cython-files-fixes-bui.patch new file mode 100644 index 0000000000..c68e227482 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-kivy/0001-Remove-old-Python-2-long-from-Cython-files-fixes-bui.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | From 288e3d5ecff1bc5e7de29d9daddb83d697280004 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mirko Galimberti <me@mirkogalimberti.com> | ||
| 3 | Date: Sun, 18 May 2025 09:38:14 +0200 | ||
| 4 | Subject: [PATCH] Remove old Python 2 long from Cython files, fixes build with | ||
| 5 | Cython `3.1.x` (#9056) | ||
| 6 | |||
| 7 | Upstream-Status: Backport [https://github.com/kivy/kivy/commit/5a1b27d7d3bdee6cedb55440bfae9c4e66fb3c68] | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | kivy/graphics/context_instructions.pyx | 2 +- | ||
| 11 | kivy/graphics/opengl.pyx | 4 ++-- | ||
| 12 | kivy/weakproxy.pyx | 3 --- | ||
| 13 | 3 files changed, 3 insertions(+), 6 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/kivy/graphics/context_instructions.pyx b/kivy/graphics/context_instructions.pyx | ||
| 16 | index 0d4b8f548..1c23c0e1c 100644 | ||
| 17 | --- a/kivy/graphics/context_instructions.pyx | ||
| 18 | +++ b/kivy/graphics/context_instructions.pyx | ||
| 19 | @@ -86,7 +86,7 @@ cdef tuple rgb_to_hsv(float r, float g, float b): | ||
| 20 | |||
| 21 | cdef tuple hsv_to_rgb(float h, float s, float v): | ||
| 22 | if s == 0.0: return v, v, v | ||
| 23 | - cdef long i = long(h * 6.0) | ||
| 24 | + cdef long i = <long>(h * 6.0) | ||
| 25 | cdef float f = (h * <float>6.0) - i | ||
| 26 | cdef float p = v * (<float>1.0 - s) | ||
| 27 | cdef float q = v * (<float>1.0 - s * f) | ||
| 28 | diff --git a/kivy/graphics/opengl.pyx b/kivy/graphics/opengl.pyx | ||
| 29 | index bcca70842..f535c62a6 100644 | ||
| 30 | --- a/kivy/graphics/opengl.pyx | ||
| 31 | +++ b/kivy/graphics/opengl.pyx | ||
| 32 | @@ -689,7 +689,7 @@ def glDrawElements(GLenum mode, GLsizei count, GLenum type, indices): | ||
| 33 | cdef void *ptr = NULL | ||
| 34 | if isinstance(indices, bytes): | ||
| 35 | ptr = <void *>(<char *>(<bytes>indices)) | ||
| 36 | - elif isinstance(indices, (long, int)): | ||
| 37 | + elif isinstance(indices, int): | ||
| 38 | ptr = <void *>(<unsigned int>indices) | ||
| 39 | else: | ||
| 40 | raise TypeError("Argument 'indices' has incorrect type (expected bytes or int).") | ||
| 41 | @@ -1539,7 +1539,7 @@ def glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean norma | ||
| 42 | cdef void *ptr = NULL | ||
| 43 | if isinstance(data, bytes): | ||
| 44 | ptr = <void *>(<char *>(<bytes>data)) | ||
| 45 | - elif isinstance(data, (long, int)): | ||
| 46 | + elif isinstance(data, int): | ||
| 47 | ptr = <void *>(<unsigned int>data) | ||
| 48 | else: | ||
| 49 | raise TypeError("Argument 'data' has incorrect type (expected bytes or int).") | ||
| 50 | diff --git a/kivy/weakproxy.pyx b/kivy/weakproxy.pyx | ||
| 51 | index cac4fe66b..e8e1c0b77 100644 | ||
| 52 | --- a/kivy/weakproxy.pyx | ||
| 53 | +++ b/kivy/weakproxy.pyx | ||
| 54 | @@ -253,9 +253,6 @@ cdef class WeakProxy(object): | ||
| 55 | def __int__(self): | ||
| 56 | return int(self.__ref__()) | ||
| 57 | |||
| 58 | - def __long__(self): | ||
| 59 | - return long(self.__ref__()) | ||
| 60 | - | ||
| 61 | def __float__(self): | ||
| 62 | return float(self.__ref__()) | ||
| 63 | |||
diff --git a/meta-python/recipes-devtools/python/python3-kivy_2.3.1.bb b/meta-python/recipes-devtools/python/python3-kivy_2.3.1.bb index dd60ea43d5..83dc97955c 100644 --- a/meta-python/recipes-devtools/python/python3-kivy_2.3.1.bb +++ b/meta-python/recipes-devtools/python/python3-kivy_2.3.1.bb | |||
| @@ -12,6 +12,7 @@ inherit setuptools3 pkgconfig features_check cython | |||
| 12 | # Also, if using SDL2 as backend, SDL2 needs to be configured with gles | 12 | # Also, if using SDL2 as backend, SDL2 needs to be configured with gles |
| 13 | SRC_URI = "git://github.com/kivy/kivy.git;protocol=https;branch=stable \ | 13 | SRC_URI = "git://github.com/kivy/kivy.git;protocol=https;branch=stable \ |
| 14 | file://0001-add-support-for-glesv2.patch \ | 14 | file://0001-add-support-for-glesv2.patch \ |
| 15 | file://0001-Remove-old-Python-2-long-from-Cython-files-fixes-bui.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRCREV = "20d74dcd30f143abbd1aa94c76bafc5bd934d5bd" | 18 | SRCREV = "20d74dcd30f143abbd1aa94c76bafc5bd934d5bd" |
