On a Debian system without python3-distutils install, uwsgi-cgi was
failing to build because it couldn't import sysconfig from distutils.
OpenWrt packages should be using the OpenWrt python not the system
python. In addition we need to use python3 not python2, even when
both are available.
(cherry-pick
c387d0923c8ced06f685b487f84ae0836d7f3e9b from master)
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
+PKG_BUILD_DEPENDS:=python3/host
+
include $(INCLUDE_DIR)/package.mk
define Package/uwsgi-cgi
endef
MAKE_VARS+=\
- CPP=$(TARGET_CROSS)cpp
+ CPP=$(TARGET_CROSS)cpp \
+ PYTHON=$(STAGING_DIR_HOSTPKG)/bin/python3
define Build/Compile
$(call Build/Compile/Default,PROFILE=cgi)
--- /dev/null
+Index: uwsgi-2.0.18/Makefile
+===================================================================
+--- uwsgi-2.0.18.orig/Makefile
++++ uwsgi-2.0.18/Makefile
+@@ -1,4 +1,4 @@
+-PYTHON := python
++PYTHON ?= python3
+
+ all:
+ $(PYTHON) uwsgiconfig.py --build $(PROFILE)