summaryrefslogtreecommitdiff
path: root/dev-python/uv-build
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/uv-build')
-rw-r--r--dev-python/uv-build/Manifest1
-rw-r--r--dev-python/uv-build/uv-build-0.13.4.ebuild100
2 files changed, 101 insertions, 0 deletions
diff --git a/dev-python/uv-build/Manifest b/dev-python/uv-build/Manifest
index 4966413124b7..69bbc2faff51 100644
--- a/dev-python/uv-build/Manifest
+++ b/dev-python/uv-build/Manifest
@@ -7,3 +7,4 @@ DIST uv_build-0.12.7.tar.gz 418759 BLAKE2B 94aa33b2644f849a686d80d7f7d365ca84336
DIST uv_build-0.12.9.tar.gz 423446 BLAKE2B 8f32f7527633f5853a11a0f798a2aa075f9e96c2b34144f986a639dbd042bac7c5e33853287ef43273352a3ee84da852062c42daead1f188281295b635694177 SHA512 3aa6ea5b4e60218e7cbc3c5ed8ff7fbeeace36eb0d2c75627fb7a0ce7c060e8d6405378e9713f7164319cce55dc96b1a335ccb3032cfc7e9e60e99862295e79e
DIST uv_build-0.13.1.tar.gz 446632 BLAKE2B 543350d4a3d6ba53ea5d52f0f840245a6865f029a48f4f095d4d191b0ca502960526660f9255d60bb8e15b00c6daba9afbe7a8c19e61ca841fa5524a9b63c10b SHA512 42f4739a21e068af66b884a22f7fd57f278ebfe37a5561d5fdf95dc0c443456e5436a3ce49b26b96c70b7431c0422af37a33b529a0f6ab09e3ad108a9982350d
DIST uv_build-0.13.3.tar.gz 464136 BLAKE2B 4bcffe9228283c2c6388627d9ded292855c506aebb97efae931a6aecafdd1c5a680dc65a47651496409dde59c896e846b76f5abf4d67e2483d024f5cd93e9ffa SHA512 2fc5b9fe0e23172636b2fb927634619f5b93f1e1173ae2a8ea3ce14b4194bd2dba7bf6da6e46723c90a945a47273b8e67114398bc958e94f68bc4895af7a6574
+DIST uv_build-0.13.4.tar.gz 464427 BLAKE2B 899bd8d7628bc5a291a6f974e569484a61d1aff51745e004cb663167128470147f2dae454457e010fa495e9d9de19527e9185e90c88018e51b4352359ceca349 SHA512 2e74b38cd01468281f481fa3b1ea289e1d262986e97bf3bfd27812c08676825567c547144bc9ed090bede4eb8db3114e6e8330eeaf96a91602bdd5212ae76433
diff --git a/dev-python/uv-build/uv-build-0.13.4.ebuild b/dev-python/uv-build/uv-build-0.13.4.ebuild
new file mode 100644
index 000000000000..65d94f2051ae
--- /dev/null
+++ b/dev-python/uv-build/uv-build-0.13.4.ebuild
@@ -0,0 +1,100 @@
+# Copyright 2025-2026 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=( python3_{13..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 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86"
+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}/pyproject.toml
+uv_build-${PV}/pyproject.toml.orig
+uv_build-${PV}/
+uv_build-${PV}/README.md
+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
+}