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.30
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -18,3 +18,5 @@ DIST uv-0.11.28-crates.tar.xz 43834312 BLAKE2B c60aec44025e8258226e4c50faadd95aa
|
||||
DIST uv-0.11.28.gh.tar.gz 7332190 BLAKE2B 1b19a6cc9d0d65dc6b693dd96906c268814c272b230a6d881c6b213f984c5d063a8105888f3890c8dcb07a61bba4f082c578221a199f9cdfee37cc2dcdab1fad SHA512 b1e0468d714e70e7f4b1c9a3348ff8d7499cf463d9b59272347bfa38cc5d4d96c3913bf6c05222b26f098331cd84a3f495c4d5a4d872b45d5e735393cc3415ad
|
||||
DIST uv-0.11.29-crates.tar.xz 43221288 BLAKE2B fdb0beeeb0eb6afd6c5e6a401f34dd733466d038579565529c2ff794f568daca1b2f3b20e9dc64f7e164c1329970901e64320ada771d98db9fdb97d95375fe7d SHA512 d64272bf1ce46f4627e03f83fa7c5c23e5e50a56805bb7d66dd27431cd57ce2b00cb6db45ec4b162d004638cc0f7cfe7d6346b8020d66f5869f1e786356c5f7f
|
||||
DIST uv-0.11.29.gh.tar.gz 7390745 BLAKE2B c4366c7fe66a14246ed95734d605e8c02f2da336b3b5e93be67a0d7dae99afd3b9d15c9e59b79ae17ffb2d43f90718a72e6160a6cd422423c149fce5c45b2e77 SHA512 27d5f0f40aed962468bd3d80f04f792ec4698db9ec0930564dae25ba7a743430b04b4aa5b2cca92883b7544369200a32956337b04bd558dcc8b1ae4c5a3b1a0d
|
||||
DIST uv-0.11.30-crates.tar.xz 43265592 BLAKE2B ccbeac888d7902a32ea69d5a04f02deeed6930a98412200c07b3badde7681cfb094b520920610a57d5671979eb814ecf36ae012c5a2a4e273715ce6127900ea8 SHA512 eee68f12601fbf20ef25aca96f12fed2a7a26b5dac8d0c7129ce558ffbff80c1f55daa9879943e889d25afbaba388ba5f187b4f2ee5e753c02ed3e68592748a1
|
||||
DIST uv-0.11.30.gh.tar.gz 7407810 BLAKE2B b999322f54e4180a1301823e5ce1968d07b598f48a5ac5c4b8572009417be0f6ec724dba5595353fd026c6e0ef4fa6beec450ca06bc4c0f21b9260823c45bafb SHA512 40d35103b86f17ba0315cb0ca6f74aca5b004cd7b9a0e30efd089e048fcf4e213cd6c8752064595b45dda7e6eaedf0bf6d8eadda1fb93ee3a653897be6f23d7a
|
||||
|
||||
163
dev-python/uv/uv-0.11.30.ebuild
Normal file
163
dev-python/uv/uv-0.11.30.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.95.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