/src/plugins/ctf/common/metadata/parser.cpp
/src/plugins/ctf/common/metadata/parser.hpp
/src/plugins/ctf/common/metadata/parser.output
+/src/bindings/python/bt2/bt2.egg-info
+/src/bindings/python/bt2/dist
/src/cli/babeltrace2
/src/cli/babeltrace2.bin
/src/cli/babeltrace2-log
AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = xyes])
AM_CONDITIONAL([HAVE_PYTHON_DEV], [test "x$have_python_dev" = xyes])
+AS_IF([test "x$have_python" = xyes], [
+ AX_COMPARE_VERSION(["$PYTHON_VERSION"], [ge], ["3.12"], [
+ have_python_312_or_greater=yes
+ ])
+])
+
+AM_CONDITIONAL([HAVE_PYTHON_312_OR_GREATER], [test "x$have_python_312_or_greater" = xyes])
+
AS_IF([AE_IS_FEATURE_ENABLED([python-bindings]) || AE_IS_FEATURE_ENABLED([python-plugins])], [
AS_IF([test "x$have_python_dev" = xno], [
AC_MSG_ERROR([Cannot find a suitable python-config. You can override the python-config path with the PYTHON_CONFIG environment variable.])
pyinstall_verbose_ = $(pyinstall_verbose_@AM_DEFAULT_V@)
pyinstall_verbose_0 = @
+# For Python < 3.12, force the use of distutils even if setuptools is
+# installed. For Python >= 3.12, set the externally managed option to allow
+# installation in a directory which isn't in the current PYTHONPATH.
+if HAVE_PYTHON_312_OR_GREATER
+PY_INSTALL_OPTS = --single-version-externally-managed
+else
+export SETUPTOOLS_USE_DISTUTILS=stdlib
+endif
+
install-exec-local: build-python-bindings.stamp
$(pyinstall_verbose)opts="--prefix=$(prefix) --exec-prefix=$(exec_prefix) --record $(INSTALLED_FILES) --verbose --no-compile $(DISTSETUPOPTS)"; \
if [ "$(DESTDIR)" != "" ]; then \
opts="$$opts --root=$(DESTDIR)"; \
fi; \
- $(PYTHON) $(builddir)/setup.py install $$opts;
+ $(PYTHON) $(builddir)/setup.py install $(PY_INSTALL_OPTS) $$opts;
clean-local:
rm -rf $(builddir)/build