commit:     31502776c623d4a76f56545748649b70db9428be
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 21 03:15:34 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar 21 04:12:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31502776

dev-python/uv: Bump to 0.6.9

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

 dev-python/uv/Manifest        |   1 +
 dev-python/uv/uv-0.6.9.ebuild | 170 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 171 insertions(+)

diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index 6bef93c0dcfd..18d1142c7f18 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -11,3 +11,4 @@ DIST uv-0.6.7-crates.tar.xz 60339544 BLAKE2B 
5bde165c809ee9a66c23a1811d461502021
 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
+DIST uv-0.6.9.gh.tar.gz 3805843 BLAKE2B 
6ea1ba8ea68542896e6c076cc05548bbb2ce8c2adcb0f6ac4e59ce2bdaeffca248a333f9e549bd9532cd72ab2ed99a479d9b106b91120371ad59819ecf7ab6aa
 SHA512 
0b6791b25aaa354a1c662132af97b9b5d45785867be4ee112660b823c69d532460651a333db61c96c997448761c77fde1fd4ecb47ccd5ebc73239d81a60b984d

diff --git a/dev-python/uv/uv-0.6.9.ebuild b/dev-python/uv/uv-0.6.9.ebuild
new file mode 100644
index 000000000000..e1e90e591d0e
--- /dev/null
+++ b/dev-python/uv/uv-0.6.9.ebuild
@@ -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=0.6.8
+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
+}

Reply via email to