From 64ca54e1f9032ff9d05100c4a0f4d95a4a40bdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 25 Mar 2026 06:31:30 +0100 Subject: [PATCH] dev-python/uv: Bump to 0.11.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/uv/Manifest | 2 + dev-python/uv/uv-0.11.1.ebuild | 164 +++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 dev-python/uv/uv-0.11.1.ebuild diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 0e6d67d818cf2..a0f78b222a698 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -2,3 +2,5 @@ DIST uv-0.10.12-crates.tar.xz 40530280 BLAKE2B f7c133c5f82124ef860f8e143a4955cf8 DIST uv-0.10.12.gh.tar.gz 5104534 BLAKE2B 46888f0e7dbdb5b4d92bf0267168a72b77680193acfb6d79cf2e9ef625592fc07d6f4e926d52cd470ae71359cde317cabdb1d6f4b625115cf420b7d69935713e SHA512 e8274cd353e9964981a1befcd8c3f9533e37831f0c3288d6c7ec2232b0c1017a4a9d5fb7960e93edfabb8c7add1d1c500b0309d2e6be59164b61a4baee1ad7b8 DIST uv-0.11.0-crates.tar.xz 46998940 BLAKE2B d3447d8f11e14a01abb7531249a3c5806e9de8bc981897863d2018efc498ab0d01291b400a522030a73ae98e5b80e1451203f060c1925e044c8eb7c323b37014 SHA512 768bf9ee90e4728d853255bdb5eb68ba61ddb49f389e4264feeb2a5efae92b18be1ac403f64d37c073f7c4455113b365bd4b298293623abd598a0795b0909adf DIST uv-0.11.0.gh.tar.gz 5126290 BLAKE2B 7234ff069931ca9b6fbbba40ac250b676e870cc23f01955ed5b5b59244114ee6b2fac7bd6c47638f7134c84a912f225f5ad2f829f59fad80d8a75f2c5d3bffff SHA512 c862ca86f9e9019748fb74e9afb6c5776f7bb976d72fc54dcbc991eaa5dc6a568df924f1b8a0613917bab06890977f3f526d2a3d1a36fdb46c585daefc24adb6 +DIST uv-0.11.1-crates.tar.xz 46998940 BLAKE2B d3447d8f11e14a01abb7531249a3c5806e9de8bc981897863d2018efc498ab0d01291b400a522030a73ae98e5b80e1451203f060c1925e044c8eb7c323b37014 SHA512 768bf9ee90e4728d853255bdb5eb68ba61ddb49f389e4264feeb2a5efae92b18be1ac403f64d37c073f7c4455113b365bd4b298293623abd598a0795b0909adf +DIST uv-0.11.1.gh.tar.gz 5126423 BLAKE2B f22419906c1b6955a73418969d1c2e953daca1e53aee2c3427fe47a6421650197abedf4ec10548d99300f9409249c382df950dffbd6e9d7b78a46f6fc185d4f4 SHA512 8012635e9905913db0028a735979ac66d7b42328fca8d351129f4ba6c394b9ffc12ff1522f79120bf23489fad373dddb64591df744eac435b99fcb16d577887c diff --git a/dev-python/uv/uv-0.11.1.ebuild b/dev-python/uv/uv-0.11.1.ebuild new file mode 100644 index 0000000000000..ea2607714c56a --- /dev/null +++ b/dev-python/uv/uv-0.11.1.ebuild @@ -0,0 +1,164 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER="1.92.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 BZIP2 +" +# ring crate +LICENSE+=" openssl" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~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 + + # uv is now forcing bundled liblzma, sigh + sed -i -e '/xz/s:"static"::' Cargo.toml || die +} + +src_configure() { + local myfeatures=( + test-git + test-pypi + test-python + ) + + cargo_src_configure --no-default-features +} + +src_compile() { + cd crates/uv || die + cargo_src_compile +} + +src_test() { + 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 +}