mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/uv: Bump to 0.6.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -9,3 +9,5 @@ DIST uv-0.6.6-crates.tar.xz 60230976 BLAKE2B 9b0dcb0d8246fc275f5b508c48661f08446
|
||||
DIST uv-0.6.6.gh.tar.gz 3767860 BLAKE2B 09bcb296f10ecebc9bda81091ea9c7f589b9b44169981676b5013088c001301d2302bab8514d4c6fb9542ba0bc0d07377e68a46c35f667a6a408f86e499a1a89 SHA512 49ad9fdb411e719b5a2aae6d48750932c8ad65bace2b0a747a54b475bcd0a40da368712d074b4b3afdf28cc8003532aca712b3714d54323f184ee1358521d7c5
|
||||
DIST uv-0.6.7-crates.tar.xz 60339544 BLAKE2B 5bde165c809ee9a66c23a1811d461502021b2038c747deaa250b2f30e947712e6ccad23f188fc93b000edaaf53b657d90971803acff94ade6c61a29684cf5601 SHA512 d339b9cc8b4b19ba802d203f476da311d060962e07cffaeedd0aed05b21125b6a959a971d3654db3e26087c15331588dd6ebba2ab9e52fcd91b1a38a2dc8e9e7
|
||||
DIST uv-0.6.7.gh.tar.gz 3791242 BLAKE2B ca24f6945d6a442c32a574b901cf47dac3ede08603255b62feded82d36179a578aada04fca402d7738d2b3b78adfe22e4d1dbded502cafb2c5d4eb0407a5b5d4 SHA512 992f8a64f3d0c8f57be6959f91242ce7420c6ee94839f067dc142f895fb2c0b9ab4161b6a51112241e30c8836eefb7e5bc747f867c28bf09b95e0aaa52de8350
|
||||
DIST uv-0.6.8-crates.tar.xz 58007724 BLAKE2B bcf38b328d17e61cb74e9c1e51e0459fe91fd3b9124510e3f26606a3216189d2eb223cffd70dafce18cafe2340efc86f84379abf97444f79a57635dff0429590 SHA512 289cc35931ea54eb466e65cb279f842f06695ca09fae574dc5a3ba519db39c7441de9bf13c8c490cfa975f103b04988a943ea6de088090bbea0a944178064dbf
|
||||
DIST uv-0.6.8.gh.tar.gz 3793571 BLAKE2B 7bdcbaee54edb8114328410590406b2bb7240c597e9b5450a56a59de477467246fa6746ba21602cbd27b828c2c9606406d1701b6149b4b7160ac7ff21fe775bb SHA512 edf3e45e773bc4db3e1ee7a76419ef62beadc882f2dbe6342ec334520e170f941b55d376469677a2b8107a6ab8e38d9c704bfae6700e4f2f4932db9fda57478c
|
||||
|
||||
170
dev-python/uv/uv-0.6.8.ebuild
Normal file
170
dev-python/uv/uv-0.6.8.ebuild
Normal file
@@ -0,0 +1,170 @@
|
||||
# Copyright 2024-2025 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;c909fda63fcafe4af496a07bfda28a5aae97e58d;rs-async-zip-%commit%'
|
||||
[pubgrub]='https://github.com/astral-sh/pubgrub;b70cf707aa43f21b32f3a61b8a0889b15032d5c4;pubgrub-%commit%'
|
||||
[tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
|
||||
[version-ranges]='https://github.com/astral-sh/pubgrub;b70cf707aa43f21b32f3a61b8a0889b15032d5c4;pubgrub-%commit%/version-ranges'
|
||||
)
|
||||
|
||||
RUST_MIN_VER="1.83.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 Boost-1.0
|
||||
ISC MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 ZLIB
|
||||
"
|
||||
# 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="
|
||||
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
|
||||
!!~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
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myfeatures=(
|
||||
git
|
||||
pypi
|
||||
python
|
||||
)
|
||||
|
||||
cargo_src_configure --no-default-features
|
||||
}
|
||||
|
||||
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=
|
||||
# fix tests failing because of our config
|
||||
local -x XDG_CONFIG_DIRS=${T}
|
||||
|
||||
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