summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-07-08 05:33:48 +0200
committerMichał Górny <mgorny@gentoo.org>2024-07-08 06:40:57 +0200
commitd868423394a4bffd8896544a2612074e282177e3 (patch)
tree384e5b5275e3899453f9ab7e6568d65891876291 /dev-python/uv
parentdev-build/scons: Bump to 4.8.0 (diff)
downloadgentoo-d868423394a4bffd8896544a2612074e282177e3.tar.gz
gentoo-d868423394a4bffd8896544a2612074e282177e3.tar.bz2
gentoo-d868423394a4bffd8896544a2612074e282177e3.zip
dev-python/uv: Bump to 0.2.22
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/uv')
-rw-r--r--dev-python/uv/Manifest1
-rw-r--r--dev-python/uv/uv-0.2.22.ebuild108
2 files changed, 109 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index f225026498f2..2e9d4bb9f77d 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -5,3 +5,4 @@ DIST uv-0.2.15-crates.tar.xz 48793072 BLAKE2B 5988199d887f371f275a6ee40415743823
DIST uv-0.2.18.gh.tar.gz 1303313 BLAKE2B d14280eb1d92b2c3f43dc272da66d7e3b790f6261377a04e15751243e6c22f4a960ef78c0f52ccbff5412a0ec8acc65b0719fd5abf3cc2455079e0f1e75a5415 SHA512 3ae24e2629253ddf237a10119d20685fddc3d63a66efbc328f2d92174842e8fb6e335f6d3505642276ffc8abd349a25af985bf528ee9d42432271085a69ad018
DIST uv-0.2.20-crates.tar.xz 48761312 BLAKE2B 888ee349ef5849c0333e67d2ab2a0c80bc5bd66fdf2de3e2b9f11d62f48aa075a5b66e234800c987cbda134cd5621dc0de0ab8e9a6ab63ad4e19e7eff33c7ca9 SHA512 5b7d0d48400e90cd6cfe4d615fa9672cca08e028d5b25dca97d360729a7eec6a39bf8613d076291097a11c39851a5348e045f5ee17b27053ebfc1469bf516512
DIST uv-0.2.21.gh.tar.gz 1318725 BLAKE2B dc1cbce639a05050f7a2ca97f9ee45fab8099045970e9543174fd963b12a9a355abd69aebc37f7bc91d9884c9a882ec6f43148bdc6b20e52728675f1f3f5f5d7 SHA512 7923781117117ad5645df7792396248f8064f9107719797e5efe118b70dfd51f6e53403fe7aa87ffb7e32c9327543ba9b001ffeb95b69028695d2e75fc53e2b7
+DIST uv-0.2.22.gh.tar.gz 1311461 BLAKE2B 8fa2b9fa12220995f25426c7865dd897850617bc838beaa697764ee6566ee81e7e265d57f44f792a1a87a4fcc15d1f4de3de0dda94bb5e8a1c1c03c887b589b6 SHA512 95e67e4fcbbf5712fd25574459e4f707606cdbbd3d34735a2dcdc75fa533d2dc02177b7f3ad09139bb09d5c700352670508440d639eb191142b9372c7a5f2998
diff --git a/dev-python/uv/uv-0.2.22.ebuild b/dev-python/uv/uv-0.2.22.ebuild
new file mode 100644
index 000000000000..8839559a2ad0
--- /dev/null
+++ b/dev-python/uv/uv-0.2.22.ebuild
@@ -0,0 +1,108 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+declare -A GIT_CRATES=(
+ [async_zip]='https://github.com/charliermarsh/rs-async-zip;1dcb40cfe1bf5325a6fd4bfcf9894db40241f585;rs-async-zip-%commit%'
+ [pubgrub]='https://github.com/astral-sh/pubgrub;b4435e2f3af10dab2336a0345b35dcd622699d06;pubgrub-%commit%'
+ [reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;21ceec9a5fd2e8d6f71c3ea2999078fecbd13cbe;reqwest-middleware-%commit%/reqwest-middleware'
+ [reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;21ceec9a5fd2e8d6f71c3ea2999078fecbd13cbe;reqwest-middleware-%commit%/reqwest-retry'
+)
+
+inherit cargo check-reqs
+
+CRATE_PV=0.2.20
+DESCRIPTION="A Python package installer and resolver, written in Rust"
+HOMEPAGE="
+ https://github.com/astral-sh/uv/
+ https://pypi.org/project/uv/
+"
+# pypi sdist misses scripts/, needed for tests
+SRC_URI="
+ https://github.com/astral-sh/uv/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ ${CARGO_CRATE_URIS}
+"
+if [[ ${PKGBUMPING} != ${PVR} ]]; then
+ SRC_URI+="
+ https://dev.gentoo.org/~mgorny/dist/uv-${CRATE_PV}-crates.tar.xz
+ "
+fi
+
+# most of the code
+LICENSE="|| ( Apache-2.0 MIT )"
+# crates/pep508-rs is || ( Apache-2.0 BSD-2 ) which is covered below
+# Dependent crate licenses
+LICENSE+="
+ 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD ISC MIT
+ MPL-2.0 Unicode-DFS-2016
+"
+# ring crate
+LICENSE+=" openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="test"
+PROPERTIES="test_network"
+
+BDEPEND="
+ >=virtual/rust-1.77
+ test? (
+ dev-lang/python:3.8
+ dev-lang/python:3.9
+ dev-lang/python:3.10
+ dev-lang/python:3.11
+ dev-lang/python:3.12
+ )
+"
+
+QA_FLAGS_IGNORED="usr/bin/.*"
+
+check_space() {
+ local CHECKREQS_DISK_BUILD=3G
+ use debug && CHECKREQS_DISK_BUILD=9G
+ check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+ check_space
+}
+
+pkg_setup() {
+ check_space
+}
+
+src_prepare() {
+ default
+
+ # remove patch.* that breaks GIT_CRATES
+ sed -i -e "/^\[patch/,\$s@^\(reqwest-middleware = \).*@\1 { path = \"${WORKDIR}/reqwest-middleware-21ceec9a5fd2e8d6f71c3ea2999078fecbd13cbe/reqwest-middleware\" }@" Cargo.toml || die
+
+ # https://github.com/vorot93/tokio-tar/pull/23
+ # (fortunately uv already depends on portable-atomic, so we don't
+ # have to fight Cargo.lock)
+ cd "${WORKDIR}/cargo_home/gentoo/tokio-tar-0.3.1" || die
+ eapply "${FILESDIR}/tokio-tar-0.3.1-ppc.patch"
+}
+
+src_compile() {
+ cd crates/uv || die
+ cargo_src_compile
+}
+
+src_test() {
+ # work around https://github.com/astral-sh/uv/issues/4376
+ local -x PATH=${BROOT}/usr/lib/python-exec/python3.12:${PATH}
+
+ cd crates/uv || die
+ cargo_src_test --no-fail-fast
+}
+
+src_install() {
+ cd crates/uv || die
+ cargo_src_install
+}