commit:     65a42eeec53771d28f97cfca3410f80ca4a61413
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 10 06:49:19 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 10 07:40:48 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65a42eee

dev-python/uv: Bump to 0.9.24

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

 dev-python/uv/Manifest         |   2 +
 dev-python/uv/uv-0.9.24.ebuild | 168 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 170 insertions(+)

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index b357d991047c..31eaf3dd06c6 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -10,3 +10,5 @@ DIST uv-0.9.21-crates.tar.xz 48642776 BLAKE2B 
4ce225a3639d02ea05014c2132a7fd8baf
 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
+DIST uv-0.9.24-crates.tar.xz 48574824 BLAKE2B 
ad3fd45f6ad0ff2b84dd092adaec061539b46293bce4c05c694a1aac32ba00cafd3b6ae419149e8251baf7bc6928f8a07c7237e356731d29e222a13093d9388f
 SHA512 
c022e7cb8f9d539e9e52c48f31b8958e570cbd117db8bac4b8ecaf1ba5fd434dab451ebb32a419e426d845f3edafa07b6ad87f270da09f37d61e2ba4104ad046
+DIST uv-0.9.24.gh.tar.gz 4821236 BLAKE2B 
bb35fc9b0d9ef11bd318c9387f04e14b99968e43bca7e34afae2b32513eda6de3d2fbe1be7fe20d0859ef2866b013b3fab2d3497ef5a6976f6765ebe4d0c3d8e
 SHA512 
713f9dfda0e55b330246643618236f005e3bbee76b9b48499d1608778a7fb190e9daf19c9967fb492426f0cda31028dcaa61867b23fb861e050d2f0f36439478

diff --git a/dev-python/uv/uv-0.9.24.ebuild b/dev-python/uv/uv-0.9.24.ebuild
new file mode 100644
index 000000000000..034a691346b0
--- /dev/null
+++ b/dev-python/uv/uv-0.9.24.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
+}

Reply via email to