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 75FFF1581FD for ; Wed, 10 Sep 2025 06:04:42 +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 617A0340F5D for ; Wed, 10 Sep 2025 06:04:42 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id E9897110573; Wed, 10 Sep 2025 06:04:33 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 E2364110573 for ; Wed, 10 Sep 2025 06:04:33 +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 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 66A72340FEC for ; Wed, 10 Sep 2025 06:04:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C49ED3962 for ; Wed, 10 Sep 2025 06:04:31 +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: <1757484250.973e83e74c7188bd1090537e6c39558ef1d488f7.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.16.ebuild X-VCS-Directories: dev-python/uv/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 973e83e74c7188bd1090537e6c39558ef1d488f7 X-VCS-Branch: master Date: Wed, 10 Sep 2025 06:04:31 +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: 76557b46-a9a5-4d86-b181-084012709c21 X-Archives-Hash: 8de54cd3f7fc107387c413bdf405dd18 commit: 973e83e74c7188bd1090537e6c39558ef1d488f7 Author: Michał Górny gentoo org> AuthorDate: Wed Sep 10 04:31:41 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Sep 10 06:04:10 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=973e83e7 dev-python/uv: Bump to 0.8.16 Signed-off-by: Michał Górny gentoo.org> dev-python/uv/Manifest | 2 + dev-python/uv/uv-0.8.16.ebuild | 182 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 1c27d72a7d9b..9bf82ff125a5 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -6,6 +6,8 @@ DIST rs-async-zip-c909fda63fcafe4af496a07bfda28a5aae97e58d.gh.tar.gz 51763 BLAKE DIST tl-6e25b2ee2513d75385101a8ff9f591ef51f314ec.gh.tar.gz 37106 BLAKE2B c30d1c33f6f52e2bc83823eb6319f8a3e462b7c7408fb6a08f995747857ef234f81db4135a04f9d183095fe473a4087f8f0cb89d8f87ef4400285d2ce034ec22 SHA512 4abbc4240ed129c92da8d616e27a6df0f24cdc85a0803acfdae588ca91f9e5b8d482e3ac88b2e657ff68917b1b43cef1e7ef3c887f624659b231fa5a13fcae68 DIST uv-0.8.15-crates.tar.xz 46898116 BLAKE2B 53fa26bc5ff7a22063ed700951dc44541de66967b7a567cec27701914bcac94ac27f0e821e7ea747b483a5fb721d10d9df9ecdcb6d338fd45d70f13855fff3f0 SHA512 14576aba8d91aeb250c3e64d32cfdbdad5723d83a1c51c7311caca1f433fc0279f13dd9ff1af165e1f1b1b94663878260536611e707c97238f1084cbc99b758d 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.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.16.ebuild b/dev-python/uv/uv-0.8.16.ebuild new file mode 100644 index 000000000000..d5a02e6201af --- /dev/null +++ b/dev-python/uv/uv-0.8.16.ebuild @@ -0,0 +1,182 @@ +# 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=${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 + 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 +}