From fd47b082ab0da4bc79447a8e2bfb7e77dd71874d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Jun 2026 03:01:55 -0500 Subject: Adding metadata --- dev-python/uv/Manifest | 2 + dev-python/uv/uv-0.11.22.ebuild | 163 ++++++++++++++++++++++++++++++++++++++++ dev-python/uv/uv-9999.ebuild | 3 +- 3 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 dev-python/uv/uv-0.11.22.ebuild (limited to 'dev-python/uv') diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 9929d6ecd95e..04a3d5d58789 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -10,3 +10,5 @@ DIST uv-0.11.20-crates.tar.xz 43509336 BLAKE2B 2a1fcc003c4c2cb927225a5beec44239d DIST uv-0.11.20.gh.tar.gz 5398552 BLAKE2B 1063c7552809b21741523429c1966523ec666fee28143a555424b815ed51aadfd9139e5497ab6373b0192e7c1c449d9f021a85e08b6ebe4b1943ad9be848068b SHA512 abf8756e80cf13e7f1a752c6c38e2c340fbecc2a9d12209a5796fe076f3b4706e95757126b1acaa330b86c79711e302a69bdf1fdde9b911a92ecdeb70ed3ee81 DIST uv-0.11.21-crates.tar.xz 43509336 BLAKE2B 2a1fcc003c4c2cb927225a5beec44239d51bfa5b10d67aa6af8410ba992d8d69911942cfa8227fe1e0cf2b9ce713bebd9ca616b173f1c13e15fa8f0e612ef59c SHA512 13abc4edbec4f7f61bb4e942f2ef2b05364462f35b521610deeffb3a3ef64155ab40a3679979556f7e14feb1834ca85e6f1d49d29a7a63a0d4dc64b29d40edf8 DIST uv-0.11.21.gh.tar.gz 5420532 BLAKE2B 87bf0bc0064398dcbd9848589edcef0ec60aba55fe6dc678742caa6722738d08485edf368738ba3f83e12a13fc29a799b08d4ad3ab54de82a1b543f0c83e1b45 SHA512 c1057ff5e2387dc190d12c71fbdfddca3d99e03d2b00065f0077f9c912dbcb19ba8b81cbcd874c31f613a5ab2fafef77f6034589ccab5ee33940a6eb72714598 +DIST uv-0.11.22-crates.tar.xz 43596924 BLAKE2B deeafbb1c13c2ae42f4ba12e7c220f518997ea41b95817778d60608b6b111d108a6660baa10737c4a121570e4794f0f6544feff2b246ad1f8a9b9496d3bdff5f SHA512 b6ded3c40033b2cd610b510aa47ca20b1866d4302ec0de8892f2c1017ae48fa6795277ef5cdcb448f8f4c25cb604eee6e60bcc035650a3537951765715c4c9bd +DIST uv-0.11.22.gh.tar.gz 5449584 BLAKE2B fcfc2657737556c83a667bb4d5f2ca571a36f826b14febfd38d80565887b88f59e8aef324fa92c8e7013e69be2b984bf25b35c7678acc61d536952e286219ce3 SHA512 5c2ea2478721af3b34152809eff7a37ea19eb8ea88c912a0a75b4a112c3c56b16e798226a5c84d906633d71ee4a38d9f8fa187adc17a09c6430edcae0272c0df diff --git a/dev-python/uv/uv-0.11.22.ebuild b/dev-python/uv/uv-0.11.22.ebuild new file mode 100644 index 000000000000..e5931b30ed3e --- /dev/null +++ b/dev-python/uv/uv-0.11.22.ebuild @@ -0,0 +1,163 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER="1.94.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 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 + + # uv is now forcing bundled liblzma, sigh + sed -i -e '/xz/s:"static"::' Cargo.toml || 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 +} diff --git a/dev-python/uv/uv-9999.ebuild b/dev-python/uv/uv-9999.ebuild index b87ccf76f3c6..f828c19efd20 100644 --- a/dev-python/uv/uv-9999.ebuild +++ b/dev-python/uv/uv-9999.ebuild @@ -112,8 +112,7 @@ src_test() { } src_install() { - cd crates/uv || die - cargo_src_install + dobin "$(cargo_target_dir)"/{uv,uvx} insinto /etc/xdg/uv newins - uv.toml <<-EOF || die -- cgit v1.3