package/python-libconfig: fix build with python 3.8

Fixes:
 - http://autobuild.buildroot.org/results/edf32c178b7912a987e119f776a51f464424dceb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine
2019-10-25 18:42:36 +02:00
committed by Thomas Petazzoni
parent 1e55b66e97
commit 177013b86e
2 changed files with 12 additions and 44 deletions

View File

@@ -14,4 +14,16 @@ PYTHON_LIBCONFIG_SETUP_TYPE = setuptools
PYTHON_LIBCONFIG_DEPENDENCIES = libconfig boost
ifeq ($(BR2_PACKAGE_PYTHON),y)
PYTHON_LIBCONFIG_PYVER = $(PYTHON_VERSION_MAJOR)
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
PYTHON_LIBCONFIG_PYVER = $(PYTHON3_VERSION_MAJOR)
endif
define PYTHON_LIBCONFIG_FIX_SETUP
$(SED) 's/boost_python/boost_python$(subst .,,$(PYTHON_LIBCONFIG_PYVER))/g' \
$(@D)/setup.py
endef
PYTHON_LIBCONFIG_POST_PATCH_HOOKS += PYTHON_LIBCONFIG_FIX_SETUP
$(eval $(python-package))