commit:     15309f1d68d874233d3c6e73e35f63ef721e416a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  8 02:42:40 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 02:42:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15309f1d

dev-python/uv: Bump to 0.4.19

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/uv/Manifest         |   2 +
 dev-python/uv/uv-0.4.19.ebuild | 144 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 146 insertions(+)

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index f8721bc6e8d6..95bdb581dd67 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -7,3 +7,5 @@ DIST uv-0.4.16.gh.tar.gz 2685666 BLAKE2B 
34159ce43382bcd5b10191b6b9ed763ca831c75
 DIST uv-0.4.17.gh.tar.gz 2698002 BLAKE2B 
aa208d30d3378e6ea21d1cb9f9c3c7d55169485964a3a7e8b97119e25624cdbb84776e5695ed0d265df3d12254acbe03b68739be1468fb07ac0a94ce9a408105
 SHA512 
0681f50b8edb52479d1cc08f44a7b37f176cf439bae440259e42339138d9b036ce9b025e9a517e090c7ef5674828275a99b0735ab7174aaf334f0bb95b8ed71c
 DIST uv-0.4.18-crates.tar.xz 45322392 BLAKE2B 
3486f46b76a6a9420b52043a227ebb4dbdd185bbc5848a9606c1eb2e6575b12d060f084243fbb55fbfc1bb936f0bb051fae4a9628639778a33b2ff1eac50c58e
 SHA512 
121c6241422668662233de6a2f084a323be4df4dfcfa9ae168f5f6aa41fc77cfc09b56dfa95eaf7ca95769a9d4ed334bed439d3bbd18c682e377c610162821e4
 DIST uv-0.4.18.gh.tar.gz 2692682 BLAKE2B 
8239bcd761ee771c0bfeba3d3d6dd1438e8f86ffe2f211893a8457160440d0ba8a8ca11b6e4c7a9a93d3f3749ceae3ac2ea1c7ed1397a5ae41e130f6eb17025d
 SHA512 
694793867a016f7c5fd6520b0d91f1ee1e0bff25efe86628c365837849b74b5a6c8527d977ddf4eed52619291b7ae6df751c77f368e184882938711be5ac9ed7
+DIST uv-0.4.19-crates.tar.xz 45735064 BLAKE2B 
edd35a94b5340e8d343696374d053d0478ff008ab200d3a0b087cfdca02046564d3c579aab02008f3dc51417277633247e0a439ec9130168a9676b6f72bbc2ab
 SHA512 
c15f90c76582c32c4058f52520d6f14ecb3dd0b03788045c81947e79b3e679a6b666e8d37bf4b8de364bf51ee718968b3dcdc4e0473464db295fa859e9e5be19
+DIST uv-0.4.19.gh.tar.gz 2676746 BLAKE2B 
cefb8eca5de939e3cf3d365a927bfe036fa8efe27b8a2553c71c2c4d3247523cae08f20bec5f00ae3876698f0644bd1e1f224aecbfe5480983e77e1b4385bd27
 SHA512 
5836364371a7fa72f061b82f7e45c0c6794f8533ff15f9be8cfd9a9cd8eb9686307b09cd600b8d04ddd0baf56028cbdbd311412afd28778abde7307e9df9ce9d

diff --git a/dev-python/uv/uv-0.4.19.ebuild b/dev-python/uv/uv-0.4.19.ebuild
new file mode 100644
index 000000000000..98825ce3a93f
--- /dev/null
+++ b/dev-python/uv/uv-0.4.19.ebuild
@@ -0,0 +1,144 @@
+# Copyright 2024 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;011b24604fa7bc223daaad7712c0694bac8f0a87;rs-async-zip-%commit%'
+       
[pubgrub]='https://github.com/astral-sh/pubgrub;388685a8711092971930986644cfed152d1a1f6c;pubgrub-%commit%'
+       
[reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;5e3eaf254b5bd481c75d2710eed055f95b756913;reqwest-middleware-%commit%/reqwest-middleware'
+       
[reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;5e3eaf254b5bd481c75d2710eed055f95b756913;reqwest-middleware-%commit%/reqwest-retry'
+       
[tl]='https://github.com/charliermarsh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
+)
+
+inherit cargo check-reqs
+
+CRATE_PV=0.4.19
+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://dev.gentoo.org/~mgorny/dist/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 ISC MIT
+       MPL-2.0 Unicode-DFS-2016
+"
+# 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="
+       >=virtual/rust-1.80
+       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
+       )
+"
+
+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
+}
+
+src_prepare() {
+       default
+
+       # remove patch.* that breaks GIT_CRATES
+       local reqmw=${GIT_CRATES[reqwest-middleware]}
+       reqmw=${reqmw#*;}
+       reqmw=${reqmw%;*}
+       sed -i -e "/^\[patch/,\$s@^\(reqwest-middleware = \).*@\1 { path = 
\"${WORKDIR}/reqwest-middleware-${reqmw}/reqwest-middleware\" }@" 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=
+
+       cd crates/uv || die
+       cargo_src_test --no-fail-fast
+}
+
+src_install() {
+       cd crates/uv || die
+       cargo_src_install
+}

Reply via email to