Introduce a new DISTUTILS_USE_PEP517 value "no" that stands for
"no build system". This is primarily meant to replace the legacy
distutils-r1 logic used for bootstrapping baseline PEP 517 packages.
At the same time, it provides a convenient replacement for some
of the uses of python-r1.
In this mode, the eclass does not add PEP 517-specific dependencies
and the default python_compile() is a no-op. However, it does set dependencies, REQUIRED_USE and enables sub-phase usage (with respect to DISTUTILS_OPTIONAL). It also permits using
distutils_enable_{sphinx,tests}.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 9293f744c7c2..f3d224a51224 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -106,6 +106,8 @@ esac
#
# - maturin - maturin backend
#
+# - no - no PEP517 build system (see below)
+#
# - pbr - pbr backend
#
# - pdm - pdm.pep517 backend
@@ -121,6 +123,17 @@ esac
#
# The variable needs to be set before the inherit line. The eclass
# adds appropriate build-time dependencies and verifies the value.
+#
+# The special value "no" indicates that the package has no build system.
+# This is not equivalent to unset DISTUTILS_USE_PEP517 (legacy mode).
+# It causes the eclass not to include any build system dependencies
+# and to disable default python_compile() and python_install()
+# implementations. Baseline Python deps and phase functions will still
+# be set (dependin