commit:     77bfc6a1cdc89204c0f2daa1544ee5f402195de7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 22 16:26:56 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr  2 07:06:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77bfc6a1

distutils-r1.eclass: Support uv-build backend

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 98e9dfb50985..bbcd0b15b262 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -137,6 +137,8 @@
 # - standalone - standalone build systems without external deps
 #   (used for bootstrapping).
 #
+# - uv-build - uv-build backend (using dev-python/uv)
+#
 # The variable needs to be set before the inherit line.  The eclass
 # adds appropriate build-time dependencies and verifies the value.
 #
@@ -316,6 +318,11 @@ _distutils_set_globals() {
                                ;;
                        standalone)
                                ;;
+                       uv-build)
+                               bdep+='
+                                       dev-python/uv-build[${PYTHON_USEDEP}]
+                               '
+                               ;;
                        *)
                                die "Unknown 
DISTUTILS_USE_PEP517=${DISTUTILS_USE_PEP517}"
                                ;;
@@ -905,6 +912,12 @@ _distutils-r1_print_package_versions() {
                                        dev-python/sip
                                )
                                ;;
+                       uv-build)
+                               packages+=(
+                                       dev-python/uv
+                                       dev-python/uv-build
+                               )
+                               ;;
                esac
        else
                case ${DISTUTILS_USE_SETUPTOOLS} in
@@ -1098,6 +1111,9 @@ _distutils-r1_backend_to_key() {
                sipbuild.api)
                        echo sip
                        ;;
+               uv_build)
+                       echo uv-build
+                       ;;
                *)
                        die "Unknown backend: ${backend}"
                        ;;

Reply via email to