From cabc3bbcc9960d021d656111eef8804d6d12ac38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 21 Nov 2025 03:31:24 +0100 Subject: [PATCH] dev-python/uv: Bump to 0.9.11 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.9.11.ebuild | 167 +++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 dev-python/uv/uv-0.9.11.ebuild diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index a72c25e45f70..af56fd1f7fd7 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -5,6 +5,8 @@ DIST rs-async-zip-f6a41d32866003c868d03ed791a89c794f61b703.gh.tar.gz 37571 BLAKE DIST tl-6e25b2ee2513d75385101a8ff9f591ef51f314ec.gh.tar.gz 37106 BLAKE2B c30d1c33f6f52e2bc83823eb6319f8a3e462b7c7408fb6a08f995747857ef234f81db4135a04f9d183095fe473a4087f8f0cb89d8f87ef4400285d2ce034ec22 SHA512 4abbc4240ed129c92da8d616e27a6df0f24cdc85a0803acfdae588ca91f9e5b8d482e3ac88b2e657ff68917b1b43cef1e7ef3c887f624659b231fa5a13fcae68 DIST uv-0.9.10-crates.tar.xz 46325424 BLAKE2B 44d29933a889fc6cdd94d78a253d238b3852a2b22257f0cd0da28f4de5058aca7093756d9feaa8036b8085bd8d8853f86ee44c16cc8f43e0b19c75720e266d8d SHA512 ddef0bd35dc392f693a6cac4bb88aebcd5252fd31c4fab32303f582e579228ac4531e1bdf5b7c2ab0278dbc607e737d3663ae682f088fcfc60a81274e28456ff DIST uv-0.9.10.gh.tar.gz 4791512 BLAKE2B 3e4b6499992c7a14741d3c05a9a99703b37fcdeda5f9f8db3becaa2c44e3504c1f0170ca12e2c45cd8a6551cb5aa2b6d59a0ff8ade6e7c3341e5941a2ddd56fa SHA512 d5359ab37c2e7b91ded7875544b637cf1d46164349e36004a801e75aa501dfb5fa68458e7b94a1de947ef1cf3d0c18990695c8d2a2ca37d84f5ecc78ea854689 +DIST uv-0.9.11-crates.tar.xz 46466972 BLAKE2B 2d953b33911283ba96474a6d265043ead6b7340b3203c3b5fe98e7eacca0d28f9729080ec40b6174b56300e0fcc1b6fdb1e11a0cd42cfb28a866836498ab01b8 SHA512 ad4e0c987c0ad4942680ba7c848c3c87b6c02e9292573f84c0fdfc4165e8a4002f50b7f254fb2e617ff61fb276c794fe6a447ed0fbd1ebe2abd8580b82683598 +DIST uv-0.9.11.gh.tar.gz 4813209 BLAKE2B 3849e3f6156623b7f56aa215b081f6b16675e7f588f21b08a6cdb4738b1bf4866e1ed0ff386a2ba11b1df9bc39b6f7ab1bf253d59c2062ea6c1e5f95a2d4f7a2 SHA512 a3399fa2f68c59c777743990e1b76db7da172486c32e45349ca9ccb27a2f29c6d691f23ecd6095f8805f58a2867925485fed4d0d3a367c592111f79cf62e7d03 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.11.ebuild b/dev-python/uv/uv-0.9.11.ebuild new file mode 100644 index 000000000000..253d1ec065af --- /dev/null +++ b/dev-python/uv/uv-0.9.11.ebuild @@ -0,0 +1,167 @@ +# 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=" + 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 +}