mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-python/uv: Bump to 0.11.3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -6,3 +6,5 @@ DIST uv-0.11.1-crates.tar.xz 46998940 BLAKE2B d3447d8f11e14a01abb7531249a3c5806e
|
||||
DIST uv-0.11.1.gh.tar.gz 5126423 BLAKE2B f22419906c1b6955a73418969d1c2e953daca1e53aee2c3427fe47a6421650197abedf4ec10548d99300f9409249c382df950dffbd6e9d7b78a46f6fc185d4f4 SHA512 8012635e9905913db0028a735979ac66d7b42328fca8d351129f4ba6c394b9ffc12ff1522f79120bf23489fad373dddb64591df744eac435b99fcb16d577887c
|
||||
DIST uv-0.11.2-crates.tar.xz 46998940 BLAKE2B d3447d8f11e14a01abb7531249a3c5806e9de8bc981897863d2018efc498ab0d01291b400a522030a73ae98e5b80e1451203f060c1925e044c8eb7c323b37014 SHA512 768bf9ee90e4728d853255bdb5eb68ba61ddb49f389e4264feeb2a5efae92b18be1ac403f64d37c073f7c4455113b365bd4b298293623abd598a0795b0909adf
|
||||
DIST uv-0.11.2.gh.tar.gz 5135705 BLAKE2B abcedb5bbf0ef2c6585580818a7b11046a1555559254c2255a929050a61d3906fe176007ca8d39d0b4a2fc8582ce70376a73b7b6c4856af796056099750ecea1 SHA512 5db8253e1403a21a82c172429f8a2ee336d19a7b1e640942bd8b6a523defa8308f60b035c8ffae40d1de9292a598a5619f36debf5bf7bb3663b1f630e311cfd4
|
||||
DIST uv-0.11.3-crates.tar.xz 46981748 BLAKE2B be42ea0a2997d23ddbd1e2772c4ad1e7a2ab8866624fa3e8eee31638e65293a5241ae0a3b3c2cecab64250b8e166f548c041145ed840a91e8c90d4d1d79ffcb8 SHA512 99686a97e1f630c396b6e7b282e85b37642b3fefb05233ec0276f4fc8fc297738c600c2348c5f15c5744242dfe121412f0bf2d4339f59b254b02ab9f4612d614
|
||||
DIST uv-0.11.3.gh.tar.gz 5161685 BLAKE2B 901bb7292d0febd3970ff84913143bc3d31252f6e2bad08ef67bdb3638eb00760b0eea5717f5b5e40e2fd862c065fafe1ac23b57b186434fe5f0899835795c44 SHA512 5694bbb75136052b929356d8a7c66d16af515709a5f68c8d5d0a8353fa51a724677bab16c6288a53d128e95614898444f6ee3cc686bb34817ff15796d4dc46f9
|
||||
|
||||
164
dev-python/uv/uv-0.11.3.ebuild
Normal file
164
dev-python/uv/uv-0.11.3.ebuild
Normal file
@@ -0,0 +1,164 @@
|
||||
# Copyright 2024-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
RUST_MIN_VER="1.92.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 MPL-2.0 Unicode-3.0 Unicode-DFS-2016
|
||||
ZLIB BZIP2
|
||||
"
|
||||
# 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() {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user