From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 739851581FD for ; Thu, 11 Sep 2025 04:56:46 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6101D341415 for ; Thu, 11 Sep 2025 04:56:46 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 6F064110571; Thu, 11 Sep 2025 04:56:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 5E2C4110377 for ; Thu, 11 Sep 2025 04:56:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F06653409EC for ; Thu, 11 Sep 2025 04:56:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 827403973 for ; Thu, 11 Sep 2025 04:56:41 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1757566586.c991718821e45484a38e63c1c3eea58303431608.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/uv/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/uv/Manifest dev-python/uv/uv-0.8.17.ebuild X-VCS-Directories: dev-python/uv/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c991718821e45484a38e63c1c3eea58303431608 X-VCS-Branch: master Date: Thu, 11 Sep 2025 04:56:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 17fafb2a-ea62-432b-a705-0d2eb368730b X-Archives-Hash: 215036857cd017c597c61634b46918cb commit: c991718821e45484a38e63c1c3eea58303431608 Author: Michał Górny gentoo org> AuthorDate: Thu Sep 11 03:54:18 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Sep 11 04:56:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9917188 dev-python/uv: Bump to 0.8.17 Signed-off-by: Michał Górny gentoo.org> dev-python/uv/Manifest | 1 + dev-python/uv/uv-0.8.17.ebuild | 183 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 9bf82ff125a5..c9968cb14e31 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -8,6 +8,7 @@ DIST uv-0.8.15-crates.tar.xz 46898116 BLAKE2B 53fa26bc5ff7a22063ed700951dc44541d DIST uv-0.8.15.gh.tar.gz 4424880 BLAKE2B 89dcf4dbf4f43774b9107f0c1c068654d49bca837a5852c5bf05be588232f0157bbf7b2d2d961bea75c37b815f51bd1d12f943bf9129720c2caee1dd923c54b9 SHA512 eafe6f8d74e476d404ac48a69115c0965152a07c876b87139f04b48770df2b7a5c42e04efb7a12297e1e341248a8551f87ab286dbd5fe06a41de029eff54ee4e DIST uv-0.8.16-crates.tar.xz 46965296 BLAKE2B 7c866d7c2843c7942acfe71c4f040d51a95a50d43a6df41730ad536ae6d58b56a279a556bec26613400abdec5248f5b0d1fb012dd62f0b1d00aa397fcb71c7e4 SHA512 8410b56732d35ae2bc101403350c2344875310f9e91a72373647b0be7fe6e434b203478591ab43b21507614729d3437eb1b3e78be5993cd9432941ba70c00b42 DIST uv-0.8.16.gh.tar.gz 4441379 BLAKE2B b7c914a03e8a14fe08de8cdeaaf073efca0a15c933aa5db5918da6df529ea68c0c8c25fc7dc7e2632a895b3da631a1e51000a7c65ee3bac72a063b5e8a43c2c4 SHA512 8799554f7fbdc01277792ffddcf1731db2ddb8e67b387324ae52087c1a4ae64375186f588b535771fa7c66dacd7d78c3aa71d1ca232325f32c095a09d48041a4 +DIST uv-0.8.17.gh.tar.gz 4443731 BLAKE2B 747eceb88ef5e2eecbb5a3c827ff11646c6589c33026adc91a07199726cc0be2002c849380c5ce0ea67faea144c41a84c3f74db04d00f274b4c0301309d06d95 SHA512 f8d331fa717fca1ecea0907ac5da483ab1f6ec4a1cdf149549dbbc765353b0e28f47ab472270a52581042260e58c03f8cfead6a315969852d057b030d9b9075e DIST uv-0.8.2-crates.tar.xz 58707128 BLAKE2B 9579ad6877a960596fc49908e4f9451c8748c7f0ab41be15f310f43a19dcd61632fc7dd4fe4a2ad21cdc1478354c6b39e07272b8160296dc9dba9f70628a6f76 SHA512 442e7f2d550c00808f07297eda196ceec75aea3c9fbc1d86f288dc4c9d974f8197dac36f550ff903bb78f9c193eeab7447934f4f7bbb7799d246db28d9cf052a DIST uv-0.8.2.gh.tar.gz 4195351 BLAKE2B b50da561a66f4aac40c5fe6b55a1c10482155dc968bd6532927819ad0bb6f6b97de1b7707a32887b272ede682158b86d5f75bc10410a9fe7af8a7d2de204984a SHA512 9d10f182ab0fefb6028a0424a8cc1467f34e65de24a358a9038b8104f62808f479d004d3a45df7264b6aea81933353b78f1b3963c37ff66ec9da4a53cdca0e2c DIST uv-0.8.6-crates.tar.xz 46208952 BLAKE2B f9557a45fbfaa9d6006f935629130960b5d414cd185d7fbdb1415e7f3875568d07ade946a0b606712e9e2e06e7964bb0fb8318e02e78609899a852ed073b87a6 SHA512 c79fa70a6a670dc2d80efbf0b51942806b2b16ab7b4c63983ab634453ab32142322302bd68ab80f5bcfee08138bca8d04a7d152c76ca5d94bfc40255cab8477b diff --git a/dev-python/uv/uv-0.8.17.ebuild b/dev-python/uv/uv-0.8.17.ebuild new file mode 100644 index 000000000000..1e66902c9c41 --- /dev/null +++ b/dev-python/uv/uv-0.8.17.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;06ec5a5f59ffaeb6cf5079c6cb184467da06c9db;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;06ec5a5f59ffaeb6cf5079c6cb184467da06c9db;pubgrub-%commit%/version-ranges' +) + +inherit cargo check-reqs + +CRATE_PV=0.8.16 +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 +}