commit:     5b7435e2c2e22a2a72c7741bb65a9cc1001b9858
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 30 03:37:42 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 30 03:37:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7435e2

dev-python/uv: Bump to 0.9.20

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

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

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index c069a8f7a843..574d1f2a029d 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -13,6 +13,8 @@ DIST uv-0.9.17-crates.tar.xz 46506536 BLAKE2B 
3f28c12f81a6e909b8aa6f321f8db9c4f7
 DIST uv-0.9.17.gh.tar.gz 4774663 BLAKE2B 
1b19ed5451699bee3d75cf1bba9c232122dc1eed501415541f28c1c86e4642d4828896a9abc0e8ce6570f2fd4ff91953565b5138e5684a93028781ff195832ca
 SHA512 
7d25dc611ca004145ca84472df822670f479610eb60699dbff52f428a605d75604e49b98fc37d6e6d4d60c5a0536cbe9d2f8c0f306b6a93ed44c64112d7bc69f
 DIST uv-0.9.18-crates.tar.xz 48624732 BLAKE2B 
5a890046ca810c9f0c3779310a413a0614bb4d6625fb36bd15a5979600826dc00d2d294b881d66b2f37ace6784e4f3e53e0aeb04f2c3bd1ba1b93345c2a88389
 SHA512 
a0f8fbb93bb7596bba4ece6cd2db6fe1104fec1c7d5936743f157496e52d74d18ba3f1b16992f4cc435ea7b0a96e2bde4c4062c73335c28751f1222a49bc0a61
 DIST uv-0.9.18.gh.tar.gz 4786468 BLAKE2B 
3df1ca97128242a655a392cd61cd0b4c943f77804553f8722db058e3a2dc0698803f422609ae52bf64e5f8922d13fd596ca7b898756c8d360da5bed4b656c29a
 SHA512 
e0d880d6cf946979fbc6333f086aa6a54893fca19bae6d62e82d831c7502c2150d829a861edeb4c29fe7320d7c7da902693039d597b945f58ae803eadc7f5a17
+DIST uv-0.9.20-crates.tar.xz 48642776 BLAKE2B 
4ce225a3639d02ea05014c2132a7fd8baf53f3bd0bf3cafc6ebde144f2cea982426835f91bcb587e8dba122afe381c5a0ffa654667d4677f0b0b18b4b63a2f2e
 SHA512 
db391109602bf1afbe868740ee977e76f92911136f61a9db8918ca89bcabdad02b75f1892cef200a370ea91829e177fd6c775aff9522f72fb90f2fc9d3acb22a
+DIST uv-0.9.20.gh.tar.gz 4798126 BLAKE2B 
5eea15de759c52386f7c610455a9ffd71ae040fc6ad19652b0a4c86c8ee6543ca6f5a680c6aac3f0119924dcc1fddbb486588697060af73974a058e683d96792
 SHA512 
4b9d1e6e6d89aa1901b26715e9c2bb720e8132134ac0516bf01a40576c6d6e7fb97205321d50e3fd0f35fb69309af437f23643261cc11d55c2c8cb1db22fdafb
 DIST uv-0.9.4-crates.tar.xz 46093644 BLAKE2B 
bdce4b138718b91a67ccb36e6d8839358ab2ddeeedec3017bc245b0717e32d890a41f8c9c831983681ec715ce458efa8d43356c189b9b7457df3e71122924e3f
 SHA512 
7047b68db7e05abb6a399250a4a531499985d42f12eff61ad1557823b37d62576b38b51ccbe39a02bc9a98af6341de728466b262c49bb48dd30abb64eb804660
 DIST uv-0.9.4.gh.tar.gz 4749319 BLAKE2B 
b46d44830f7a2a621f3ab420db85e9d999b7c42ddebc21403ea2f11e819e8295af37049f1529848a3fd83ef87ac0de26ce1e1c03bf4177c3032b9adfd6dfe1e8
 SHA512 
ae11c1e777e3d0e036f0a665e2edfb9a4b5b50a9e107d795113b626bc16d406d3fca12e8a133185e54279b2a64f8e3d276372cefc9a96b2ac5f1ed0ece2c10b0
 DIST uv-0.9.6-crates.tar.xz 45696768 BLAKE2B 
96cff52c0e5477c4e9648e3863d32bde4b34a1a46b6d96703c48fe340b655319e951471aa6403c09818c313a59b0e54804467efa7e13a8410de34299a98f077b
 SHA512 
46964460f3404304faefd1758bb07bcddf1d48efbdd2b890ddb0d2623841e1a0c86108ac3c9312ed8e2f8fcaefbf9b022b57cd6074fdb6d52f43c35e3b3c2d32

diff --git a/dev-python/uv/uv-0.9.20.ebuild b/dev-python/uv/uv-0.9.20.ebuild
new file mode 100644
index 000000000000..fe3eb6a3dc83
--- /dev/null
+++ b/dev-python/uv/uv-0.9.20.ebuild
@@ -0,0 +1,168 @@
+# Copyright 2024-2025 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