mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
dev-python/uv: Bump to 0.11.24
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -6,3 +6,5 @@ DIST uv-0.11.21-crates.tar.xz 43509336 BLAKE2B 2a1fcc003c4c2cb927225a5beec44239d
|
||||
DIST uv-0.11.21.gh.tar.gz 5420532 BLAKE2B 87bf0bc0064398dcbd9848589edcef0ec60aba55fe6dc678742caa6722738d08485edf368738ba3f83e12a13fc29a799b08d4ad3ab54de82a1b543f0c83e1b45 SHA512 c1057ff5e2387dc190d12c71fbdfddca3d99e03d2b00065f0077f9c912dbcb19ba8b81cbcd874c31f613a5ab2fafef77f6034589ccab5ee33940a6eb72714598
|
||||
DIST uv-0.11.23-crates.tar.xz 43596924 BLAKE2B deeafbb1c13c2ae42f4ba12e7c220f518997ea41b95817778d60608b6b111d108a6660baa10737c4a121570e4794f0f6544feff2b246ad1f8a9b9496d3bdff5f SHA512 b6ded3c40033b2cd610b510aa47ca20b1866d4302ec0de8892f2c1017ae48fa6795277ef5cdcb448f8f4c25cb604eee6e60bcc035650a3537951765715c4c9bd
|
||||
DIST uv-0.11.23.gh.tar.gz 5488941 BLAKE2B 0d54f3f8568787cc2c6e9d1eb5dbd6f94d2d408f3872d4ca3557989f38def6ed11380e90583ab9ee162a9a2a60e1f47311f7ed3c93096117d044b580fa9a1de7 SHA512 4d40479ca540294fbdb346ca8c2dcb91fef572d1e663951ffea2370f9d09f12140aed2029be1178332874ac80150155b88774798c6424686badf7eeef646ce3f
|
||||
DIST uv-0.11.24-crates.tar.xz 43622872 BLAKE2B 42ae58c7be399b917935d18840aea0a37545fe8f55eb236946804d6d937f8c29b31076f82bb67927ebd6cbd8505ac8d66317bc3c1426edeb5d45a5ded3feb6aa SHA512 745779a5ca9f604ed37506951cb1848d21ae3e63cfb1a17ecdd0603670a18e44eb084a4f7e92f582b9d3682218f54c6c29fffb63c58edbb79b72970d57a436a5
|
||||
DIST uv-0.11.24.gh.tar.gz 5503210 BLAKE2B b73f436de8b937c05c7d54edeef28ee658784c99df2bbd6ece638f799083b51b5d59fc57913c9a5daa58b5d44f69a3f5a3c0c0f1987cda35aa110326923fcb35 SHA512 4927f0280b4041293180db6efed8c31facbb23cb4349a2383ef0488c26b21a3fc6ab98f94e7ff41bf4411f65d158208345632e130a6fae9f2bc85d40deddefec
|
||||
|
||||
163
dev-python/uv/uv-0.11.24.ebuild
Normal file
163
dev-python/uv/uv-0.11.24.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user