package/python-uvloop: force re-cythonize on build
authorAsaf Kahlon <asafka7@gmail.com>
Fri, 25 Oct 2019 18:54:45 +0000 (21:54 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 26 Oct 2019 13:35:22 +0000 (15:35 +0200)
The generated loop.c provided with the tarball was generated with
Cython 0.29.10 and it doesn't compile against the new Python 3.8
headers. Upstream is now working on a new uvloop release which will
use the newest Cython (0.29.13).  Until then, we will remove the
current loop.c and force regenration of it.

Fixes:
 - http://autobuild.buildroot.net/results/bffe1b2ee7b674f870e15398680ce5b5b22fd296

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/python-uvloop/python-uvloop.mk

index d9932b931de2baacd20227d5aefa17fb3f26b8b5..8dbe3b36d9e2b04ffb4d2623f9cdbec76d7e82cf 100644 (file)
@@ -10,8 +10,15 @@ PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/e3/15/dc3276384f436
 PYTHON_UVLOOP_SETUP_TYPE = setuptools
 PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
 PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
-PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
-PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
-PYTHON_UVLOOP_DEPENDENCIES = libuv
+PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --cython-always --use-system-libuv
+PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --cython-always --use-system-libuv
+PYTHON_UVLOOP_DEPENDENCIES = libuv host-python-cython
+
+# force regenerating loop.c with cython. can be removed with the next
+# uvloop version bump
+define PYTHON_UVLOOP_FORCE_REGEN_LOOPC
+       $(RM) $(@D)/uvloop/loop.c
+endef
+PYTHON_UVLOOP_PRE_BUILD_HOOKS += PYTHON_UVLOOP_FORCE_REGEN_LOOPC
 
 $(eval $(python-package))