File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -890,8 +890,13 @@ else
890890 else
891891 LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
892892 EXTLIBS += $(PYTHON_EMBED_LIBADD)
893- PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
894- LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
893+ PYTHON_SETUPTOOLS_INSTALLED := $(shell $(PYTHON) -c 'import setuptools;' 2> /dev/null && echo "yes" || echo "no")
894+ ifeq ($(PYTHON_SETUPTOOLS_INSTALLED), yes)
895+ PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
896+ LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
897+ else
898+ msg := $(warning Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent);
899+ endif
895900 CFLAGS += -DHAVE_LIBPYTHON_SUPPORT
896901 $(call detected,CONFIG_LIBPYTHON)
897902 endif
You can’t perform that action at this time.
0 commit comments