Detect, report and fix the deprecated flit/poetry backends to use
flit_core and poetry_core respectively. In both cases, the end result
is the same. Using flit involves unnecessary dependencies, and poetry
is not even packaged right now (and has even worse dependency hell).
Signed-off-by: Michał Górny <
[email protected]>
---
eclass/distutils-r1.eclass | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
Changes in v2: instead of failing and requiring patching ebuilds,
just emit a QA warning and switch backend internally.
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7dfd92691b59..f7c6ea202ab0 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -862,13 +862,13 @@ _distutils-r1_backend_to_key() {
local backend=${1}
case ${backend} in
- flit_core.buildapi)
+ flit_core.buildapi|flit.buildapi)
echo flit
;;
pdm.pep517.api)
echo pdm
;;
- poetry.core.masonry.api)
+ poetry.core.masonry.api|poetry.masonry.api)
echo poetry
;;
setuptools.build_meta|setuptools.build_meta:__legacy__)
@@ -950,6 +950,27 @@ distutils-r1_python_compile() {
eerror "(backend: ${build_backend})"
die "DISTUTILS_USE_PEP517 value incorrect"
fi
+
+ # fix deprecated backends up
+ local new_backend