mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-python/uv: Bump to 0.9.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -24,3 +24,4 @@ DIST uv-0.8.6.gh.tar.gz 4255911 BLAKE2B 198ed83cb487f25a35957959bca32f98b8f53437
|
||||
DIST uv-0.9.0.gh.tar.gz 4724344 BLAKE2B 43a8c9d46cb374aa2c6b3f021c2b8f7c38bbadde870eacb0a609a7541d0480ef53d0e73cfd4f54dda902f0a19792211315dc96bd5eb99ccfb687e1440ad6cd95 SHA512 f9815a8f79cf8fdb1d892b4407cfe164cd191f78ef17550481e97b6e42626b92a9a06e791205a2448e07a77f0d959ba8933060bddc22a80700f5544c0ad15820
|
||||
DIST uv-0.9.1-crates.tar.xz 46038732 BLAKE2B 83f7e8b0649341354e24e20d530640ac4bd07759bcf764526faff034e39e63f9a4efcaf4dec3c8b06dc93f86f9a767f07118332373a3adf4983abb9a7f9ee944 SHA512 27ebecd20669a5e45c8dcb770daed7e7ec4f985d871d73dc7a3378882ced3e704c02153a66a8351a5706514c9ae0174ab6c25c269a2aa2ec376834799073b87a
|
||||
DIST uv-0.9.1.gh.tar.gz 4729329 BLAKE2B f859b68ca6d4da3df30cf4f17a7741e17da029195d1caade5017a599ef1227ea8824ff95aef0fa4669c2532440cefa5b05a528c9767728fcb4a8c05f13b4de37 SHA512 82ebac748368b08fcb9841c28de0a86f11510518c73f8c062bc6e960cdfa2da0a612ce24599893cc5072c46a31dabffd1358b803f16ed78ffd31b83694a99212
|
||||
DIST uv-0.9.2.gh.tar.gz 4737210 BLAKE2B f2f74fa8015aa05073f317a96abf0e8b1177d16401a5e42c279cd7edc2c992b392cb2be953ae9d1f43279577d313e7104359851ce4b8b695d5c3915d1abbeede SHA512 197cbb4503fbd353b6f2f28db8d0a2a47040f15829164b1fc6827a8772f6ab354b502852b41f2217b824febada7c8c8e5287dec2f9b1dcc94c42cb9adab35f23
|
||||
|
||||
183
dev-python/uv/uv-0.9.2.ebuild
Normal file
183
dev-python/uv/uv-0.9.2.ebuild
Normal file
@@ -0,0 +1,183 @@
|
||||
# Copyright 2024-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
RUST_MIN_VER="1.88.0"
|
||||
|
||||
declare -A GIT_CRATES=(
|
||||
[async_zip]='https://github.com/astral-sh/rs-async-zip;285e48742b74ab109887d62e1ae79e7c15fd4878;rs-async-zip-%commit%'
|
||||
[pubgrub]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%'
|
||||
[reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-middleware'
|
||||
[reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-retry'
|
||||
[tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
|
||||
[version-ranges]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%/version-ranges'
|
||||
)
|
||||
|
||||
inherit cargo check-reqs
|
||||
|
||||
CRATE_PV=0.9.1
|
||||
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
|
||||
"
|
||||
# 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.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
|
||||
|
||||
# replace upstream crate substitution with our crate substitution, sigh
|
||||
local pkg
|
||||
for pkg in reqwest-middleware reqwest-retry; do
|
||||
local dep=$(grep "^${pkg}" "${ECARGO_HOME}"/config.toml || die)
|
||||
sed -i -e "/\[patch\.crates-io\]/,\$s;^${pkg}.*$;${dep};" Cargo.toml || die
|
||||
done
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
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