commit:     aed95b71feefbfd3b0ceed2579a68c4271124ef0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 01:02:22 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 02:06:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aed95b71

dev-python/uv-build: Bump to 0.7.10

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

 dev-python/uv-build/Manifest               |  1 +
 dev-python/uv-build/uv-build-0.7.10.ebuild | 99 ++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/dev-python/uv-build/Manifest b/dev-python/uv-build/Manifest
index 274688d52857..674b07ee04fd 100644
--- a/dev-python/uv-build/Manifest
+++ b/dev-python/uv-build/Manifest
@@ -1,3 +1,4 @@
 DIST uv_build-0.6.17.tar.gz 300696 BLAKE2B 
3f15068232e20b4b70ef319f90a258efc0d38be668bc438c91354b5ede4cb03235abc912292e2747249eab5c54c1fbc3cfa91ab1335881b975fce9677340c54e
 SHA512 
2827629a11a9775661554f3eae4f3c6018637203c18f739ce728973ee0e7f905bef7c9fcc200f95393e2e13c167e31fdf0ab8dced59c028c3c600d47ba373752
+DIST uv_build-0.7.10.tar.gz 308530 BLAKE2B 
01ec0cc519966665129c29e7cfe5522cf070d3377b4172265f7a8dbea441979022875eb091371e868ca6c9ab80c497c85b789b5c81b93c8e004fd8b6e0e05240
 SHA512 
744e4ac1e5be3579a7a89cdd2b6f0e40a1d681fd51c7dc44bcfbce8c51a61cffa8cdb8006c02526a7bb27ad7cf2b02cf33be7107b36487a89835e81e079ffa54
 DIST uv_build-0.7.8.tar.gz 305609 BLAKE2B 
89d2e7ff95f4375d4fff758463c1cf918c3ec475a1e0de04fcc51b4bd0fefe1aca50ea223b3cc456c5944f0673702ab971374829fb568e4521129acb0a770506
 SHA512 
bde37f82ae781531e50425ff247219e4e2908c7e46200a65a74e8e2b8b48a0d5cd60476138c160bd1d07aa8c9a581f5da01e79fd7883d018f10617ddba8b8349
 DIST uv_build-0.7.9.tar.gz 308177 BLAKE2B 
38bd8d4640a239dac740503929c7b31ba591e101e0778cbd5e3c9db6513082f0382bc982affc7cf3a5af3998647ae58ebf870388dc0d67e2ed7fda5764cc9176
 SHA512 
f316aae21cbf15dc281d79eaa10af1b56efd70d484ae37b831d7216c268e03c6a46c50a212e617e932a6cf0805f2cb114e91caf92afe1c1d994ba06209255e90

diff --git a/dev-python/uv-build/uv-build-0.7.10.ebuild 
b/dev-python/uv-build/uv-build-0.7.10.ebuild
new file mode 100644
index 000000000000..7b6a5ee54e1b
--- /dev/null
+++ b/dev-python/uv-build/uv-build-0.7.10.ebuild
@@ -0,0 +1,99 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Maturin compiles uv-build executable for every impl, we do not want
+# that, so we use another backend.  And since we use another backend,
+# why not dogfood it in the first place?
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="PEP517 uv build backend"
+HOMEPAGE="
+       https://github.com/astral-sh/uv/
+       https://pypi.org/project/uv-build/
+"
+
+LICENSE="|| ( Apache-2.0 MIT )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-python/uv-${PV}
+"
+BDEPEND="
+       test? (
+               app-arch/unzip
+               dev-python/build[${PYTHON_USEDEP}]
+       )
+"
+
+src_prepare() {
+       distutils-r1_src_prepare
+
+       # use the executable from dev-python/uv instead of building
+       # a largely overlapping uv-build executable (at least for now)
+       sed -i -e '/USE_UV_EXECUTABLE/s:False:True:' 
python/uv_build/__init__.py || die
+
+       # replace the build-system section
+       sed -i -e '/\[build-system\]/,$d' pyproject.toml || die
+       cat >> pyproject.toml <<-EOF || die
+               [build-system]
+               requires = ["uv_build<9999"]
+               build-backend = "uv_build"
+               backend-path = ["src"]
+       EOF
+
+       # rename to make uv-build find it
+       mv python src || die
+}
+
+python_test() {
+       "${EPYTHON}" -m build -n || die "Self-build failed with ${EPYTHON}"
+
+       local zip_result=$(
+               unzip -t "dist/uv_build-${PV}-py3-none-any.whl" || die
+       )
+       local zip_expected="\
+Archive:  dist/uv_build-${PV}-py3-none-any.whl
+    testing: uv_build/                OK
+    testing: uv_build/__init__.py     OK
+    testing: uv_build/__main__.py     OK
+    testing: uv_build/py.typed        OK
+    testing: uv_build-${PV}.dist-info/   OK
+    testing: uv_build-${PV}.dist-info/WHEEL   OK
+    testing: uv_build-${PV}.dist-info/METADATA   OK
+    testing: uv_build-${PV}.dist-info/RECORD   OK
+No errors detected in compressed data of dist/uv_build-${PV}-py3-none-any.whl.\
+"
+       if [[ ${zip_result} != ${zip_expected} ]]; then
+               eerror ".zip result:\n${zip_result}"
+               eerror ".zip expected:\n${zip_expected}"
+               die ".whl result mismatch"
+       fi
+
+       local tar_result=$(
+               tar -tf "dist/uv_build-${PV}.tar.gz" || die
+       )
+       local tar_expected="\
+uv_build-${PV}/PKG-INFO
+uv_build-${PV}/
+uv_build-${PV}/README.md
+uv_build-${PV}/pyproject.toml
+uv_build-${PV}/src
+uv_build-${PV}/src/uv_build
+uv_build-${PV}/src/uv_build/__init__.py
+uv_build-${PV}/src/uv_build/__main__.py
+uv_build-${PV}/src/uv_build/py.typed\
+"
+       if [[ ${tar_result} != ${tar_expected} ]]; then
+               eerror ".tar.gz result:\n${tar_result}"
+               eerror ".tar.gz expected:\n${tar_expected}"
+               die ".tar.gz result mismatch"
+       fi
+}

Reply via email to