commit:     cfff5aae9dc13d94b7f1d94ac59d9ab0626c9fbc
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 23 05:02:33 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 23 05:55:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfff5aae

dev-python/uv: Bump to 0.8.20

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

 dev-python/uv/Manifest         |   3 +
 dev-python/uv/uv-0.8.20.ebuild | 183 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 186 insertions(+)

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index 9ba3c3597421..a5c18580d1de 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -1,4 +1,5 @@
 DIST pubgrub-06ec5a5f59ffaeb6cf5079c6cb184467da06c9db.gh.tar.gz 99881 BLAKE2B 
5fcc2d1a06eb44351773081de4f616c93301eb2fe71b0c6f7b95779ec4bd9bb6cccc702a87a6399b0674711302a19de3a96fa31044660430fd74ff549000ad25
 SHA512 
3f0b18aecbc73fee91fc7de9f10d240ddc06c836fa2f116c1f007dd7818d099e6aea1852ca0b8d1a26ac19aac896535dba1a6298851a65515b553810c6245784
+DIST pubgrub-d8efd77673c9a90792da9da31b6c0da7ea8a324b.gh.tar.gz 100042 BLAKE2B 
cacdd77783aae1a94c3aaea56c2bd47b22f13ca34eddcef53b5d205244a213eff2934db03965532085c1aa6892b27bbbabfc19513f62936f8ac1faa466570dd4
 SHA512 
3a2a146fd9d9b458dced6563a1f5674e81e8ba36de11be5c189b0c76b6ede6f32957f48fb0978b97b0892768822c6c4c32c6870141e8fc1ea5d8b8f7d8b5b464
 DIST reqwest-middleware-7650ed76215a962a96d94a79be71c27bffde7ab2.gh.tar.gz 
42520 BLAKE2B 
ca415865947873f8b309f5b348a600677802fa8128a154b7c86d3e30bffece9df8606504073ddb688c5185e27866b5d7dc8a891e6d390ca075910a691e9bb2aa
 SHA512 
904fd652b0f3ecc90eee571d5488aba977dee643a1d6267e2fda264fa4c7b4bfcfacd4d5a23287dfb710ecc82d667479fcd0c48166259c2368df0e8b0c9d6707
 DIST reqwest-middleware-ad8b9d332d1773fde8b4cd008486de5973e0a3f8.gh.tar.gz 
41975 BLAKE2B 
db42a68b8f0d592edc297462c19a34caa068464b9a5f307e8e1c1fdacde95cd08c5af0f73fa55ed62217dee63940a1d02a4322c5edb2c2c8a568a7e04efd80e6
 SHA512 
2dad83835c87cdd79e2a08c19b5024b3fdf30d1d8cd14e480e434612e856ecc20a5404881ff81d5793d3e9d5808ee3d59ce920312a86a100535009da43d7d46b
 DIST rs-async-zip-285e48742b74ab109887d62e1ae79e7c15fd4878.gh.tar.gz 37003 
BLAKE2B 
c4aed18d82641ced2771ad8b8e800c45b1ded279e8ba1874ec9766907d042ae13b460beac739ced6e31c03a647e4238af96fb41e8c0dff4c5d4dd7f59c0ebbff
 SHA512 
d6dd699f43ca6e23a4c8abb8673b37d3983081a8c78545492ea3c1d0b35e3a491277c341df6dd64fb7efaec3b23eb479dede99e9b41016b5504d1a6dc9fbc617
@@ -11,5 +12,7 @@ DIST uv-0.8.17.gh.tar.gz 4443731 BLAKE2B 
747eceb88ef5e2eecbb5a3c827ff11646c6589c
 DIST uv-0.8.18-crates.tar.xz 45354832 BLAKE2B 
48c0f06f699015f9206fd916027e1346996479ec4665b43ac7b60cb1ca281b0706021b6ef1688e4df6cdb601a3d8e8ada882937e24bde659c4cc51c81ee11b0b
 SHA512 
d2583a283bcb29ab4781fa201677ec7cade1fc3ac2c47b224f3fc23eff31e1ee140cbc5f763bdca5fac983eb25fb74f4d466869023bb49dc9ab423ffadd768af
 DIST uv-0.8.18.gh.tar.gz 4693782 BLAKE2B 
636f45447de3ed21bde705c900b0299b34f106c7b2740478cfe2cdeee1c9fece1250912a908e05e378320918deb809656a61987507fc9741d68f0d2a7c82a929
 SHA512 
a21e001cc241050c0fa19b1d5629a347e61f1fd3f0854fa855b5a78c2dcd68fcaf1336ce3f769e50430dd279418c644c473002d175ccebc934ee9c0cb4a38c65
 DIST uv-0.8.19.gh.tar.gz 4700498 BLAKE2B 
60d0b2b0fc406b9b91502942c71d51d70ad97e33f11aa4787f4c9caccbeddc1d97c3948a57017516918260dfb3904372285aaf2809b376d75d56c1d34f1042a4
 SHA512 
565825f348422d2247d9bb32d30fc22e00240ac63b271ebb77a67cf7d5ba84de768819b03274194085ff941c742a76e4cc27129922b3db6ea63e58b694e97b59
+DIST uv-0.8.20-crates.tar.xz 45310716 BLAKE2B 
4fe01bda1fe2c879742433bfedbc459fb9e4387324449722648344f5b17178bf70848b92df9129327ea7fd010c7ae59a222be96b19f5617b871c1f22fe229cf2
 SHA512 
baa62bd819aaf8499647e1bd65d233cedb29af2cc81154f89983c167158f4fdfed3b74b79a429c773fafba3b54eddffd38e61254e09b3a57149b3fa1419cdf5f
+DIST uv-0.8.20.gh.tar.gz 4702175 BLAKE2B 
ffb1898d1acd59fe9befd2ae2842d133619b9d9ec2e114b5332848b0155ebc065589951363df167f1b2e8dc48fe103fd97da8542a5e1a551d6938635fcb628c5
 SHA512 
80e6566b8152b5f2eff8f1f8991ed4f62465670aa5a179dc055fa8395968581369ebd9289000b934c28e395b39185ea18d705066016ea969abbbe42985064668
 DIST uv-0.8.6-crates.tar.xz 46208952 BLAKE2B 
f9557a45fbfaa9d6006f935629130960b5d414cd185d7fbdb1415e7f3875568d07ade946a0b606712e9e2e06e7964bb0fb8318e02e78609899a852ed073b87a6
 SHA512 
c79fa70a6a670dc2d80efbf0b51942806b2b16ab7b4c63983ab634453ab32142322302bd68ab80f5bcfee08138bca8d04a7d152c76ca5d94bfc40255cab8477b
 DIST uv-0.8.6.gh.tar.gz 4255911 BLAKE2B 
198ed83cb487f25a35957959bca32f98b8f5343712a7a9bbf3f817f189f1ec9c7903fa2e64ec65c9b3e18a469506c942ebb0ca50b39a353dc7e82228386fb69c
 SHA512 
d164488e967364d254bab989933a5faf27c52c91da1bdeb6f3419fce335dfac5d4ea6cd717cac6b05fee9f85605cf21930c3d37119c49a98cb13c53d51ea996d

diff --git a/dev-python/uv/uv-0.8.20.ebuild b/dev-python/uv/uv-0.8.20.ebuild
new file mode 100644
index 000000000000..fa234db7db08
--- /dev/null
+++ b/dev-python/uv/uv-0.8.20.ebuild
@@ -0,0 +1,183 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+RUST_MIN_VER="1.88.0"
+
+declare -A GIT_CRATES=(
+       
[async_zip]='https://github.com/astral-sh/rs-async-zip;285e48742b74ab109887d62e1ae79e7c15fd4878;rs-async-zip-%commit%'
+       
[pubgrub]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%'
+       
[reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-middleware'
+       
[reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-retry'
+       
[tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
+       
[version-ranges]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%/version-ranges'
+)
+
+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
+       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="
+       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
+
+       # replace upstream crate substitution with our crate substitution, sigh
+       local pkg
+       for pkg in reqwest-middleware reqwest-retry; do
+               local dep=$(grep "^${pkg}" "${ECARGO_HOME}"/config.toml || die)
+               sed -i -e "/\[patch\.crates-io\]/,\$s;^${pkg}.*$;${dep};" 
Cargo.toml || die
+       done
+
+       # 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