From d91ddcabbc5ae326d2523ac872590b5dc3f3341b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 1 Aug 2026 07:26:49 +0200 Subject: [PATCH] dev-python/uv: Bump to 0.12.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.12.1.ebuild | 149 +++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 dev-python/uv/uv-0.12.1.ebuild diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 6a85ff7acd758..521ca3db87738 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -12,3 +12,5 @@ DIST uv-0.11.33-crates.tar.xz 43219524 BLAKE2B 0bcf077c48985bc4a790757b024299497 DIST uv-0.11.33.gh.tar.gz 7168539 BLAKE2B be74751529dcdb824c70ef06b02bbc5c47be8e40039ba4c0a2c78980160df1c144054214f8809c41b5eaa59668f1b3555d666915e891e002db8a4e0fd770c5b0 SHA512 eebc671598b627b9c152da0bad7b3a723788d517b919b0be6db7bea15f89188df613ec04e0b5f1ce189d333faaabbda6649c0ef2f031bd6159cb36aac1c409b6 DIST uv-0.12.0-crates.tar.xz 42286476 BLAKE2B 031c88dec26d9c9fb84180b985c622d5c0a0e702efbebd3b40085837b8b90365df4d471b34b37217b16158f04a2565951f423805ab683eea78aba6eb958f38bc SHA512 8d76ab7404177ccdc965e0dc3cf562d330506f113bda6fbb3af94e97a52caf6f8568f78ae72e51ca989752d83c973cc2d199c649a7aa5d1f149a6a13722f9c2e DIST uv-0.12.0.gh.tar.gz 7201759 BLAKE2B 0653d93487280965d45f81a7d1ecb1c4e735eddbab790bb25c29d29fc1482809d9f133f54e31c48a2d8e8b1afdeb140880d878d2f440c9f656ad6dba5b68489e SHA512 9dfcb42b4d74c9f26dbb4e6b5ed1a424aafd3c4c2920766682f9d0fa5e54f52a6e9c76fd8d78bc10f6bc0054daed7e339bb01cc79d5114fd51cfc67a27186558 +DIST uv-0.12.1-crates.tar.xz 42260544 BLAKE2B decb42423e6d5804ff4b12c956e678b14e067263e3711acf8ab7577ba87226a35501c463fbbf9ff0fa149d6a76bffb9c5a46a355dfc4a26f7e7c49f1d4e4accb SHA512 277a830b7de031f27d11973c8503d6311a6521b7a7b7df310b9445e690ce672ac5b880a506c8ace998ea28e1721dc0cf7fc17d43538a63318159634dbd9773c5 +DIST uv-0.12.1.gh.tar.gz 7231201 BLAKE2B d83bab24879f3b92ef842150f3af3d8c08850155f8b7d120c1c4a16f463911b55fe2b2ab6c3e928d654ab1c2db56062094f9ae994bf7f67252ee7ec9d3dc74a4 SHA512 15c84d4b719295c1d9fca178025317d1b808f4c34a572609b78e35382bb12abdc4ba7a3b2bd1bc5576763b655b34b222be15f99c3481419f92a5f74e460ef96f diff --git a/dev-python/uv/uv-0.12.1.ebuild b/dev-python/uv/uv-0.12.1.ebuild new file mode 100644 index 0000000000000..f53df25bf195b --- /dev/null +++ b/dev-python/uv/uv-0.12.1.ebuild @@ -0,0 +1,149 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER="1.95.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 MIT-0 MPL-2.0 Unicode-3.0 + Unicode-DFS-2016 ZLIB +" +# 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 tikv-jemalloc-sys? + + # remove unbundled sources, just in case + find "${ECARGO_VENDOR}"/zstd-sys-*/ -name '*.c' -delete || 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() { + dobin "$(cargo_target_dir)"/{uv,uvx} + + 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 +}