dev-python/uv: Bump to 0.8.23

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-10-05 04:21:47 +02:00
parent b44b215dd5
commit 80d4e6acf8
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
2 changed files with 185 additions and 0 deletions

View File

@ -16,5 +16,7 @@ DIST uv-0.8.20-crates.tar.xz 45310716 BLAKE2B 4fe01bda1fe2c879742433bfedbc459fb9
DIST uv-0.8.20.gh.tar.gz 4702175 BLAKE2B ffb1898d1acd59fe9befd2ae2842d133619b9d9ec2e114b5332848b0155ebc065589951363df167f1b2e8dc48fe103fd97da8542a5e1a551d6938635fcb628c5 SHA512 80e6566b8152b5f2eff8f1f8991ed4f62465670aa5a179dc055fa8395968581369ebd9289000b934c28e395b39185ea18d705066016ea969abbbe42985064668
DIST uv-0.8.22-crates.tar.xz 45793452 BLAKE2B ff9678899b1fd3a3d5cc34599ea1631dddd64485cb65506d066db7c960798b1e5bf36ef007fc54ba262d4496f4c87301a51cfc70a854ab3d00b20dbcb68ff1c2 SHA512 6e144acea42db2fd8e3922bb23d42be4fb82706a44a6da66c7bb47d360a53ea90f0b073f23893095a3893a0ca61ea053eee6d878b87bf3664abd601e38c1ec2c
DIST uv-0.8.22.gh.tar.gz 4707422 BLAKE2B f205c01e46f2e638c125f2ce3e97fdcb761e9fdc9993b8cddcb41dc1ccda1785d013c6c30992760f1a0929d1a0bfe30711325e55f9051fb3eb731c284ecfb693 SHA512 625d5bf4a824ed785f819fded89f980e50d7a393a537b8ac4f75f3c1985d51e57e8e982960441029e526ffa09a63781262567c336615444309ffef300d90e1dd
DIST uv-0.8.23-crates.tar.xz 45766372 BLAKE2B 2637a9fe79fb647b74c8666b4574a94a98873e3d82d192fd941ad4e8cade231ff8251830dc6273a4355abc03cc8ac231d96125bef786f54b665068a13d5454a3 SHA512 df4b95502004d2bdec5ec3ee40e6ee8fef9b1744e4cf6c8944cff533f65a7edc4f9fa4988d768f85fbaf025b1dd2d2bb24bab903d7673247fad86741afa646f9
DIST uv-0.8.23.gh.tar.gz 4713451 BLAKE2B 0315ebd13331e1b48a469e6bb0e470db75c0d9d3ed6349d3318a533494dc716789386e5ebae3141b2d7fe5d41987f97f9cc9273b2800409bd6ececb2aa25dc6b SHA512 b8fc563ee0bf69fbd809e140b28657e9cbc93233ae7d04cf8b852b3aa3be2ea636c5ae24649ea36cc5e95e6089a4c5400dcf088327a71225b7677b9622e315a7
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

View File

@ -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 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="
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
}