commit: 6965c8db51810e7041aa40013a4d9d8c8b7a0dbf
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 7 03:00:56 2026 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jan 7 04:16:26 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6965c8db
dev-python/uv: Bump to 0.9.22
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/uv/Manifest | 2 +
dev-python/uv/uv-0.9.22.ebuild | 168 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 170 insertions(+)
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index cabc2a69edbc..b357d991047c 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -8,3 +8,5 @@ DIST uv-0.9.20-crates.tar.xz 48642776 BLAKE2B
4ce225a3639d02ea05014c2132a7fd8baf
DIST uv-0.9.20.gh.tar.gz 4798126 BLAKE2B
5eea15de759c52386f7c610455a9ffd71ae040fc6ad19652b0a4c86c8ee6543ca6f5a680c6aac3f0119924dcc1fddbb486588697060af73974a058e683d96792
SHA512
4b9d1e6e6d89aa1901b26715e9c2bb720e8132134ac0516bf01a40576c6d6e7fb97205321d50e3fd0f35fb69309af437f23643261cc11d55c2c8cb1db22fdafb
DIST uv-0.9.21-crates.tar.xz 48642776 BLAKE2B
4ce225a3639d02ea05014c2132a7fd8baf53f3bd0bf3cafc6ebde144f2cea982426835f91bcb587e8dba122afe381c5a0ffa654667d4677f0b0b18b4b63a2f2e
SHA512
db391109602bf1afbe868740ee977e76f92911136f61a9db8918ca89bcabdad02b75f1892cef200a370ea91829e177fd6c775aff9522f72fb90f2fc9d3acb22a
DIST uv-0.9.21.gh.tar.gz 4799580 BLAKE2B
88a65fd86bc3b124e6470c701c387bfe2b4a41c21d4eb82870966b94ab6db6fc5819aaaf2c04c04d1cd2ed367353e995185103ce145e88dc17f9bba507e9a162
SHA512
38c852dfca2bdfa839c37342ace2482d5182e2d4f7b4334ee32da200364912ccbedda04cf08cf89d974ad0f82c374444a19156c9df65ce11019d4a214bf26eb3
+DIST uv-0.9.22-crates.tar.xz 48579584 BLAKE2B
22f8c31082fcaf9d2a5de73d4bfa6dee0b52ef79eba095c7607ed6e73642a9987f498858e7971f2c616fdec83aa4aa20b518600d3e795a96a33bf6b7b0a77e1e
SHA512
ce6d62c73ecb5a66c348606065979bf3a2929f4f678e82c54dda3f2390146cf4ed92f38f1d642ea6fdfcf83a7d939d2792e8fdd3c72776f8fe38ddf35fe0c684
+DIST uv-0.9.22.gh.tar.gz 4801340 BLAKE2B
a392a39c106141986d2f9e7b493ec2d4d836284cdb2d683e43febc1b9fe615fa7eef08a4d9f6e7690727b9553fab9b23c2a8ee3b4d5599e96623cc46b0bd9abd
SHA512
2dbe4075a8110384435a333ebe47e64429dcbd7e54891671e380b7904fb6f450bc50fc7a456e31448b46a51822216f234db9602674a5ecf6995052a3cfb5fcad
diff --git a/dev-python/uv/uv-0.9.22.ebuild b/dev-python/uv/uv-0.9.22.ebuild
new file mode 100644
index 000000000000..034a691346b0
--- /dev/null
+++ b/dev-python/uv/uv-0.9.22.ebuild
@@ -0,0 +1,168 @@
+# Copyright 2024-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+RUST_MIN_VER="1.89.0"
+
+inherit cargo check-reqs
+
+CRATE_PV=${PV}
+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://github.com/gentoo-crate-dist/uv/releases/download/${CRATE_PV}/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 CC0-1.0
+ CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016
+ ZLIB
+"
+# ring crate
+LICENSE+=" openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="test"
+PROPERTIES="test_network"
+
+DEPEND="
+ app-arch/bzip2:=
+ app-arch/xz-utils:=
+ app-arch/zstd:=
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ dev-lang/python:3.9
+ dev-lang/python:3.10
+ dev-lang/python:3.11
+ dev-lang/python:3.12
+ dev-lang/python:3.13
+ !!~dev-python/uv-0.5.0
+ )
+"
+
+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
+ rust_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # force thin lto, makes build much faster and less memory hungry
+ # (i.e. makes it possible to actually build uv on 32-bit PPC)
+ sed -i -e '/lto/s:fat:thin:' Cargo.toml || die
+
+ # enable system libraries where supported
+ export ZSTD_SYS_USE_PKG_CONFIG=1
+ # TODO: unbundle libz-ng-sys, tikv-jemalloc-sys?
+
+ # remove unbundled sources, just in case
+ find "${ECARGO_VENDOR}"/{bzip2,lzma,zstd}-sys-*/ -name '*.c' -delete ||
die
+
+ # bzip2-sys requires a pkg-config file
+ # https://github.com/alexcrichton/bzip2-rs/issues/104
+ mkdir "${T}/pkg-config" || die
+ export
PKG_CONFIG_PATH=${T}/pkg-config${PKG_CONFIG_PATH+:${PKG_CONFIG_PATH}}
+ cat >> "${T}/pkg-config/bzip2.pc" <<-EOF || die
+ Name: bzip2
+ Version: 9999
+ Description:
+ Libs: -lbz2
+ EOF
+}
+
+src_configure() {
+ local myfeatures=(
+ git
+ pypi
+ python
+ )
+
+ cargo_src_configure --no-default-features
+}
+
+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}
+ local -x COLUMNS=100
+ local -x PYTHONDONTWRITEBYTECODE=
+ # fix tests failing because of our config
+ local -x XDG_CONFIG_DIRS=${T}
+
+ cd crates/uv || die
+ cargo_src_test --no-fail-fast
+}
+
+src_install() {
+ cd crates/uv || die
+ cargo_src_install
+
+ insinto /etc/xdg/uv
+ newins - uv.toml <<-EOF || die
+ # These defaults match Fedora, see:
+ # https://src.fedoraproject.org/rpms/uv/pull-request/18
+
+ # By default ("automatic"), uv downloads missing Python versions
+ # automatically and keeps them in the user's home directory.
+ # Disable that to make downloading opt-in, and especially
+ # to avoid unnecessarily fetching custom Python when the distro
+ # package would be preferable. Python builds can still be
+ # downloaded manually via "uv python install".
+ #
+ # https://docs.astral.sh/uv/reference/settings/#python-downloads
+ python-downloads = "manual"
+
+ # By default ("managed"), uv always prefers self-installed
+ # Python versions over the system Python, independently
+ # of versions. Since we generally expect users to use that
+ # to install old Python versions not in ::gentoo anymore,
+ # this effectively means that uv would end up preferring very
+ # old Python versions over the newer ones that are provided
+ # by the system. Default to using the system versions to avoid
+ # this counter-intuitive behavior.
+ #
+ #
https://docs.astral.sh/uv/reference/settings/#python-preference
+ python-preference = "system"
+ EOF
+}