summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/uv-build/Manifest1
-rw-r--r--dev-python/uv-build/uv-build-0.9.21.ebuild99
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/uv-build/Manifest b/dev-python/uv-build/Manifest
index e25663570fb1..97d138303cfb 100644
--- a/dev-python/uv-build/Manifest
+++ b/dev-python/uv-build/Manifest
@@ -4,6 +4,7 @@ DIST uv_build-0.9.15.tar.gz 354021 BLAKE2B a47350ead8d9672d09967bbd7f9ac2f8e231e
DIST uv_build-0.9.17.tar.gz 356435 BLAKE2B 902d134f83026a68ef8600b21d9ce8bddab281ab8a34b7b836cce2b27ae393b24ddbafbbfa18332efc5cb8b5883c4a02435b62c29fb50923cb877834a2918e76 SHA512 7b536edcf9917055634f97150dba3e91d0fe71cb49922a3bf13fa480d6d17205de172242bb5e9dbd22de1984aec0c0f78955b37811d84a9ff765254719847d36
DIST uv_build-0.9.18.tar.gz 356832 BLAKE2B 61df9000eb4eb0dc147b4a18732937a459ff27ecbd6be19e1c4496632b8b79eaedb112dd2599d74ad111899d44070cf0acbdf4bc7b57d864823e202209a2b553 SHA512 093ece50dd3c89c56c7d61f35dbe66319ea23295e21b66b7cdb73ae669956d6a68684a183faad9c59cb96fc2b26747f40609570540b8ff158d1f8f3d32bfd15c
DIST uv_build-0.9.20.tar.gz 357132 BLAKE2B eb64c2e9e0029cf8eb8f295e16897911c602f7bc3205188c224748352ec9f3843badb2407103508c2a8703f6141937e0f61d88ceaf8a31a551dad4b500c24731 SHA512 9caa5c33a8d563f4205022c0a978e8d0b1e53aa60c977dee9e83d227935675ab918de7eef96f8f6c3bf4adc4db70dbb99504cee5533cc66412c93f2263246f8b
+DIST uv_build-0.9.21.tar.gz 357539 BLAKE2B 721e12e0260301d3234f3fbc76d5944c9b15e14b345876d3f231314f64f15c5e6c37c8c7155e24605c928dbe52b12b3b02cd2f0a1373b8d93b017f2c122ddf19 SHA512 1e2885f978fa45e1481a72a35d5734ef80d3ab7da0213fc41cad8c4e49756bf0b172cea570d25a6b0461c6dd13fead8a8fae356b11ec758f8bd7b915faa322c4
DIST uv_build-0.9.4.tar.gz 332506 BLAKE2B 3b65cc80192cf3abc33bcf01735c8b7f937a12f2dcd0557d0ae255ce8bd4cb7dbb15522e73802be0e17ac10c4acad6f9075f12d5f853bb1881b0c13f1d120b33 SHA512 c3be52cfbc1cf5a229df91d9e1125925a534e3fca3041e29a16edd2334fa28b055c73e21a6bd1a3d1d63924cf8f112645300530e8cb6139fb549499ca672070f
DIST uv_build-0.9.7.tar.gz 332992 BLAKE2B 069e615f41e78098b61cc073cb01bc77e0e6778f3054ccfcf36985be3755d7e819cc1bd151e875db109461f423cc855cd336467015ec7103e47346f230564679 SHA512 d61249de00640f6e0ab62ab440a8aae1802acbd6cf8ecb8aca3efe26361d7191d057735ab91c174c5772fc04accf0ae3281f447d010c99e2f458829f4c618abc
DIST uv_build-0.9.8.tar.gz 333344 BLAKE2B 4a841b4ca879734917bd09a7d1960dad322baa969fc55ec038c0318e8931ac129a0a3d03865a55ba4fa4a0f4beba398c1715c8faf1a275c1a4458317841253e6 SHA512 2c5f54a887ce7256911dabb54435618354f3caa1a941e77ed5a4b1c7015221a0009da08e8c46d569f92ac263bc544335ed2060de37ac5c27ee0789153f2edbac
diff --git a/dev-python/uv-build/uv-build-0.9.21.ebuild b/dev-python/uv-build/uv-build-0.9.21.ebuild
new file mode 100644
index 000000000000..ca71aacd7b98
--- /dev/null
+++ b/dev-python/uv-build/uv-build-0.9.21.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 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~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}/
+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
+}