commit:     c3f057f5714b0618953c25b89a096767199f86cf
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 12:46:20 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 14:16:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3f057f5

dev-python/uv: Bump to 0.3.1

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

 dev-python/uv/Manifest                  |   4 ++
 dev-python/uv/files/uv-0.3.1-test.patch |  43 ++++++++++++
 dev-python/uv/uv-0.3.1.ebuild           | 116 ++++++++++++++++++++++++++++++++
 3 files changed, 163 insertions(+)

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index d4735f1b0d1f..5cb299e71b03 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -1,6 +1,8 @@
 DIST pubgrub-2fac39371a47e7cb821e510aaa4de25405413d29.gh.tar.gz 86987 BLAKE2B 
cbb08901aca46816279ca748a2d96e841b7a570cd674e4d96ef907a968050f5919a2d41fef240bb715050cf8df7dd6755e3d7f74fc79085bfc1ac2daf0665b09
 SHA512 
eda3539933dab8961120f1989365f8d5b5900aac5dc22606169e3f5d726bea54d3e8179377884d581941baf6bc57c2d41590477d9d3051923504d3b67824a17f
 DIST pubgrub-3f0ba760951ab0deeac874b98bb18fc90103fcf7.gh.tar.gz 87050 BLAKE2B 
d76bc40a71ead4c535eff493901247f2ee2f0a213d12db17bf96c89008be482829ff9b0d47196bb04ffc8c20842f15a2c7a4aa663d4c3f6c3eb82461250853ce
 SHA512 
cd55d4512590eb86628d933598bd3f276a09018dce8dd720496f4314872afe1ad8d0b79d16f1b358e4a77a8613c1d06c742117d3a2a9c39e4f34d0ccd86eb536
+DIST pubgrub-aaef464c1b0d8eea4ff9ffaee4f3458c236d10da.gh.tar.gz 87820 BLAKE2B 
a73f6a3b14fcfccd61ba753e16dfdd38c2424e9608b4e177440b50461b5a2886da7982a73abdc3c8b76ad6c796f96906d2db131425aac5c036ff63d0ccb2b644
 SHA512 
feec9955227f75e7a914af9b0197b2aae13e5d2e4bba9df1328ba7fe6e0edb9b508ffdbe9f6c7ff8e88d3c7a355964c10186776f4c4ec436689cebbcd92e8f07
 DIST reqwest-middleware-21ceec9a5fd2e8d6f71c3ea2999078fecbd13cbe.gh.tar.gz 
39176 BLAKE2B 
00b2d0f51e4bbe29649fea50a8cc41c7b4d534f87440dd0bf487e8f7104077ad2cde824673b6624ff71924512b8a6b33ed4ac548f64bfbf78a5e0fb1366a446f
 SHA512 
29f80816d054838af330a0ccfb8509ab22469aaecdb369d4a63c03eb3ed2aea3cc113458dd29c649e5bf7c33dbf5ef8b1e5d5a89e1cca72f9eab212f000c594f
+DIST reqwest-middleware-5e3eaf254b5bd481c75d2710eed055f95b756913.gh.tar.gz 
40049 BLAKE2B 
d284947a108e2d3233a4fa7c9eb5e1a959bc5b569e754861daef076672672b0500cb737b85871d1fc0587bdbf6d5020e03e7c906cb5de34ff2f81c05b66918d1
 SHA512 
540a71e59a8b57e5e0bd7fad18fed265552bdae4518690a9823c94dcf23ee1d436f91b9cecf21129917b25e78b91d8d7290760edaea68053666e28af7223476e
 DIST rs-async-zip-011b24604fa7bc223daaad7712c0694bac8f0a87.gh.tar.gz 51706 
BLAKE2B 
354eb52c95ea355521e1e6a7c841102424c47c156fdb0efb62e3cac666ecf289806aeefab8a0273a7c3283429ac81502283bdb5424d5f925621e5c2b1430fd4d
 SHA512 
6650eef354e84daf41a8572b98b29f2873b7f071dd1d6983292c70b2f580fdc50cd26762d2228a70c2b200eae2f40476e6604702aa62cc97558301195bf19eb8
 DIST rs-async-zip-1dcb40cfe1bf5325a6fd4bfcf9894db40241f585.gh.tar.gz 96766 
BLAKE2B 
f9efab73c65394e33e090a6292875ebf35e6669b15c356f102eb109784a4503606ae39106cd0ebe3d7d479cb0b30806d7baaaebf22d826836a24f7ed49100934
 SHA512 
3b845b05d97c5ab5cea286a7c11846838b40bb1fac98a51782600849a53231be8fa205094c6bdd00f6e193c807b10b28f947698696382be99cae0a8d681dabdc
 DIST uv-0.2.29-crates.tar.xz 48592012 BLAKE2B 
57492ede8b970171fc00c4f07ff3e9cb39dcd8bbf52433ed966963838bb9af14bfc9fc52ef5ec7e7a01af74598f066bfb5461d683a69390256fab3b69f08360a
 SHA512 
aef3ee357dfc66a2b04967cd4526a5f07ce09e6ea949641ef1934fb774133b93b106c8e5f255bba92fd375b3f1996b7b016682e9e8f1c9afa871781af163e095
@@ -8,3 +10,5 @@ DIST uv-0.2.29.gh.tar.gz 1468793 BLAKE2B 
b69397a9fa0fb855a876d5c0322c53c01c400f0
 DIST uv-0.2.30.gh.tar.gz 1475670 BLAKE2B 
f497c59a79d50d3a189621139923914dc83a230ae519c93ea5084ed0e01a1caefaa1052d0609f8583deb2192a4f5220d4df72755e7ea95ffbbe96601d56edd14
 SHA512 
67871699365e38c17dc7a2b10973f5e07a214c48f38187d6cf28541ca650d5107da1049aa1c9eea01ee7ba4acafb3493e175ed3246abb6b5b21838699669e5f2
 DIST uv-0.2.36-crates.tar.xz 49805804 BLAKE2B 
d9f71866b180e45ddad94432c5e1aad51d3ab82101899a32cb2c571882a7497cca8135f14bc6e5b6e7fc508774e81b525015a445fbda0f880f194e0cd49a4e87
 SHA512 
34860fc8cc17a959d9d556e25cf134f18a1e9f00f2db604a7225c1f22b6e5051e4dadb502582b3fa03b3ae1be6e4a70ebdd94c08f4a1f18baef8c44b32932123
 DIST uv-0.2.36.gh.tar.gz 2301352 BLAKE2B 
93476b89a0896efa87ebf9f49e6c225750ec9cc900dde253edb6f6070cc9ac3f71c7c1f9fd81e09ebe7bb6287a5881e78a63a87c0eeb469bdf3d75f3b77f96a0
 SHA512 
84de22e464b8e467588ceebdda23089233d42e3080090b2fc0fd7aec2f4b76eee1788f8b23b6e7b9c4e99182ca3ea175b76fb5dedf87767fe3ec534b3264c9b6
+DIST uv-0.3.1-crates.tar.xz 50235904 BLAKE2B 
9deb7ee2d99786dbec4b91c020bab2d32fdb696c39ea35b42e8c2380d563c756e1a7044372b1e9cc82d82e18b8c3bebd19cb7c71bccb6bd3f01ae294f2c1878d
 SHA512 
438e1d7cc94bd1214f6fe77852a9d4ec6a1a69561cc16c175ba22f9d1840021d41c8735079f522c29beaf17ac883ecbd9805d4f15e0845483bfede634e40413b
+DIST uv-0.3.1.gh.tar.gz 2400493 BLAKE2B 
e094acd1753e66beee369f6931b520a53515364774a1affb45c57f9eaeeb19cfc5fce8f40725173dd0d43fe664cfd55b904eb6de585c809aaab5ae6c54db7901
 SHA512 
145b3926e7fb0e4d14eecf6140e16a59afaf4a34a3881d8798bf87144849bd5b47b5100ed479eaf8c0e4675d1cbfb6bee509f20d1e24d25605f4dd4b2be8b24d

diff --git a/dev-python/uv/files/uv-0.3.1-test.patch 
b/dev-python/uv/files/uv-0.3.1-test.patch
new file mode 100644
index 000000000000..bd5ccaa40fe0
--- /dev/null
+++ b/dev-python/uv/files/uv-0.3.1-test.patch
@@ -0,0 +1,43 @@
+From 783eaf5963b22d2d47c1a3ece7e022ee4f85b29d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
+Date: Thu, 22 Aug 2024 07:34:21 +0200
+Subject: [PATCH] Mark emit_marker_expression* tests as requiring python-patch
+
+Mark the new tests requiring Python 3.12.1 specifically as requiring
+python-patch feature.  This makes the test suite pass again on systems
+not having this specific version (and disabling the feature).
+---
+ crates/uv/tests/pip_compile.rs | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/crates/uv/tests/pip_compile.rs b/crates/uv/tests/pip_compile.rs
+index 7b6af57dbd44..ef87fbc5cafc 100644
+--- a/crates/uv/tests/pip_compile.rs
++++ b/crates/uv/tests/pip_compile.rs
+@@ -9974,7 +9974,7 @@ fn dynamic_dependencies() -> Result<()> {
+ /// Since this test was developed on Linux, the marker expression generated is
+ /// coupled with the Linux platform. Other tests for other platforms could be
+ /// added.
+-#[cfg(target_os = "linux")]
++#[cfg(all(target_os = "linux", feature = "python-patch"))]
+ #[test]
+ fn emit_marker_expression_exciting_linux() -> Result<()> {
+     let context = TestContext::new("3.12.1");
+@@ -10011,7 +10011,7 @@ fn emit_marker_expression_exciting_linux() -> 
Result<()> {
+ ///
+ /// NOTE: This test runs on `linux` only because it requires that 
`sys_platform
+ /// == 'linux'` evaluates to `true`.
+-#[cfg(target_os = "linux")]
++#[cfg(all(target_os = "linux", feature = "python-patch"))]
+ #[test]
+ fn emit_marker_expression_direct() -> Result<()> {
+     let context = TestContext::new("3.12.1");
+@@ -10091,7 +10091,7 @@ fn emit_marker_expression_conditional() -> Result<()> {
+ /// not clear why. The `tzdata` dependency appears to be an unconditional
+ /// dependency. And if anything, I'd expect it to be included on Windows and
+ /// excluded everywhere else... Odd.)
+-#[cfg(target_os = "linux")]
++#[cfg(all(target_os = "linux", feature = "python-patch"))]
+ #[test]
+ fn emit_marker_expression_pypy() -> Result<()> {
+     let context = TestContext::new("3.12.1");

diff --git a/dev-python/uv/uv-0.3.1.ebuild b/dev-python/uv/uv-0.3.1.ebuild
new file mode 100644
index 000000000000..8fbaceba01a6
--- /dev/null
+++ b/dev-python/uv/uv-0.3.1.ebuild
@@ -0,0 +1,116 @@
+# 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;aaef464c1b0d8eea4ff9ffaee4f3458c236d10da;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'
+)
+
+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://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"
+
+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() {
+       local PATCHES=(
+               # https://github.com/astral-sh/uv/pull/6411
+               "${FILESDIR}/${P}-test.patch"
+       )
+
+       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
+
+       # https://github.com/vorot93/tokio-tar/pull/23
+       # (fortunately uv already depends on portable-atomic, so we don't
+       # have to fight Cargo.lock)
+       cd "${ECARGO_VENDOR}/tokio-tar-0.3.1" || die
+       eapply "${FILESDIR}/tokio-tar-0.3.1-ppc.patch"
+}
+
+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
+
+       cd crates/uv || die
+       cargo_src_test --no-fail-fast
+}
+
+src_install() {
+       cd crates/uv || die
+       cargo_src_install
+}

Reply via email to