From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 210A0158003 for ; Wed, 11 Sep 2024 03:09:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2082E29E0; Wed, 11 Sep 2024 03:09:55 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C5BEE29E1 for ; Wed, 11 Sep 2024 03:09:55 +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 AB3A1342FA4 for ; Wed, 11 Sep 2024 03:09:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0FE651F45 for ; Wed, 11 Sep 2024 03:09:53 +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: <1726024187.b963768294a8629d17efa68f57744117662a8360.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.4.9.ebuild X-VCS-Directories: dev-python/uv/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: b963768294a8629d17efa68f57744117662a8360 X-VCS-Branch: master Date: Wed, 11 Sep 2024 03:09:53 +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: 2353b180-406f-462e-9cc8-a719a6b7f678 X-Archives-Hash: b7b23c03bdb95322ed1f7c7df4ce6705 commit: b963768294a8629d17efa68f57744117662a8360 Author: Michał Górny gentoo org> AuthorDate: Wed Sep 11 02:57:49 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Sep 11 03:09:47 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9637682 dev-python/uv: Bump to 0.4.9 Signed-off-by: Michał Górny gentoo.org> dev-python/uv/Manifest | 2 + dev-python/uv/uv-0.4.9.ebuild | 135 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 9996b0b96b35..26c9a5705f4c 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -7,3 +7,5 @@ DIST uv-0.4.6.gh.tar.gz 2553065 BLAKE2B f793c01042db0a45b53a57157852ed5035a96bfc DIST uv-0.4.7.gh.tar.gz 2558161 BLAKE2B 5508af9b6e0d04d165aa3b120be138fb4ccfddd643395175e5d31618ec34a5139567c0162b0ce1c741fed551397d1ec9d9693ce0397d1f0346a5c1df13c20b8d SHA512 8395f96eb36c2131b203de9991b994532047b7928ac1765a426accdaae4ed3a242a8b9554808123f5359d41778d3e7783606265b60d372bed2a0a76fea027e3e DIST uv-0.4.8-crates.tar.xz 46272636 BLAKE2B 467c146c8598863c62a7a210f3c20a6a73dc318651d730803eddd5e1ae54eb815b0487e991cc4e2d493813ea6e6e8622ed503d952a63ce7ee3aa9cfbe4d36439 SHA512 b207acd6fa7d7e95d7e0b3201d9d0ae2457d427f866eb292c6e097444e6d596455e1478813cfcf6851abbe936709d4afa155e0c55367a3f9fb25d4387990a84d DIST uv-0.4.8.gh.tar.gz 2569754 BLAKE2B 413121093c1a30e75afa62f5dd6496e3686c06e956ef1d633740d498387a7b0c5272b811daf3efe10d5ba95fd628f29ff3e7ee914df03069bff287dce0c96caa SHA512 e1a728d25ca9400ddf7a005da94d217631ee2a1a2b6b2b8421496496ac9379993dc81d8603f523308a9d232a1c20058149868cc413511ef7d3c7a57bd9354938 +DIST uv-0.4.9-crates.tar.xz 46250584 BLAKE2B 6beb0a00885b674f3d8e35c67372d4ba04c6512306f78522fac2ff170d7cc6cb6c0702546da1d1de3dc84397f04258c56558c666b8f935130a0fea1debce01d0 SHA512 676f6a197af92bc9f6716c0e1df1f87d81b1b07dc81c591b94b34b985bbe4a49fb0b319fe8fba7f83d158124af84f64ebefe1ce0119e6238f9ae837e4652c5c0 +DIST uv-0.4.9.gh.tar.gz 2580667 BLAKE2B baadc0d950d57e224d7d4980424ab58c4e278c2d67a06e9d83d778ac5a6b561cdadfc514c5068ce365dbdb4da3b5165e4180567f7abe90f46d5597fce144b91d SHA512 d7746d71f1429df7d39c3f03c02934792124318f92d2eda03b68a255586567d053349e6d294da0910351d976844aee564334540563435d0e60f6a3792088f416 diff --git a/dev-python/uv/uv-0.4.9.ebuild b/dev-python/uv/uv-0.4.9.ebuild new file mode 100644 index 000000000000..ae16e664c50f --- /dev/null +++ b/dev-python/uv/uv-0.4.9.ebuild @@ -0,0 +1,135 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" + +declare -A GIT_CRATES=( + [async_zip]='https://github.com/charliermarsh/rs-async-zip;011b24604fa7bc223daaad7712c0694bac8f0a87;rs-async-zip-%commit%' + [pubgrub]='https://github.com/astral-sh/pubgrub;388685a8711092971930986644cfed152d1a1f6c;pubgrub-%commit%' + [reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;5e3eaf254b5bd481c75d2710eed055f95b756913;reqwest-middleware-%commit%/reqwest-middleware' + [reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;5e3eaf254b5bd481c75d2710eed055f95b756913;reqwest-middleware-%commit%/reqwest-retry' + [tl]='https://github.com/charliermarsh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%' +) + +inherit cargo check-reqs + +CRATE_PV=0.4.9 +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://dev.gentoo.org/~mgorny/dist/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 ISC MIT + MPL-2.0 Unicode-DFS-2016 +" +# 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=" + >=virtual/rust-1.80 + test? ( + dev-lang/python:3.8 + dev-lang/python:3.9 + dev-lang/python:3.10 + dev-lang/python:3.11 + dev-lang/python:3.12 + ) +" + +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 +} + +src_prepare() { + default + + # remove patch.* that breaks GIT_CRATES + local reqmw=${GIT_CRATES[reqwest-middleware]} + reqmw=${reqmw#*;} + reqmw=${reqmw%;*} + sed -i -e "/^\[patch/,\$s@^\(reqwest-middleware = \).*@\1 { path = \"${WORKDIR}/reqwest-middleware-${reqmw}/reqwest-middleware\" }@" Cargo.toml || die + + # enable system libraries where supported + export ZSTD_SYS_USE_PKG_CONFIG=1 + sed -i -e 's:"static"::' crates/uv-extract/Cargo.toml || die + # 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_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= + + cd crates/uv || die + cargo_src_test --no-fail-fast +} + +src_install() { + cd crates/uv || die + cargo_src_install +}