summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2026-02-18 03:38:15 +0100
committerMichał Górny <mgorny@gentoo.org>2026-02-18 03:39:28 +0100
commitcd7d9ea7bd4c0b0ffa0d5e95e339eb6b67d1cd3f (patch)
treefb0ce32365d1f77b414b108e9b52f4290f6517e2 /dev-python
parent38f45433b0ea2393f1b10e86bbe25d58096c37c6 (diff)
downloadgentoo-cd7d9ea7bd4c0b0ffa0d5e95e339eb6b67d1cd3f.tar.gz
gentoo-cd7d9ea7bd4c0b0ffa0d5e95e339eb6b67d1cd3f.tar.bz2
gentoo-cd7d9ea7bd4c0b0ffa0d5e95e339eb6b67d1cd3f.zip
dev-python/uv: Bump to 0.10.4
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/uv/Manifest2
-rw-r--r--dev-python/uv/uv-0.10.4.ebuild164
2 files changed, 166 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index 95a36339dfe4..0cca3fb76b7e 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -4,6 +4,8 @@ DIST uv-0.10.2-crates.tar.xz 40488272 BLAKE2B 7b60ce55ac335b4f22c14e4029451e5931
DIST uv-0.10.2.gh.tar.gz 4927786 BLAKE2B bdbc9014a9362121205f12046eea0999838c9a72bf6d3cb347c51c13f92cb7b5b4524b4abcc81caac297645f2863e577981b033a4ee6a29166cd818aec06a6ad SHA512 7592217ce76cd0a418a4979df045890e215c5bcff53d18e34924e0d57ec388fc8ce56b3fdc7ee473f131de5d04a4349b1dbb9d5a585493a0cd9a22dfd51e9cfc
DIST uv-0.10.3-crates.tar.xz 40664424 BLAKE2B 78f8834b7f78b74448d77dbb9e12f31c472561e8104fee73fdd70b449818b2deaa6e6600ffec1e65b533fa1b39c3703f43a71996e90036b4e045c1ec786184f0 SHA512 e79f416a6afc01cafca081e34759ee3f873239f321a17147b1ee1badbb22289feea29d003da79ca2274ef151f4f42947be4675182be4912a9590ee7f84a9165d
DIST uv-0.10.3.gh.tar.gz 4944734 BLAKE2B f2b65afbcdb88ec7d77b22ac44123aca4a2e6424d69abbd290d9b51a6470f954938e8cd9f5bb65fba2b3a5ee4383692fab3a15dd020529935021a547e3fed11d SHA512 a8f41a5fc74b30f8e0dd7bd24786148a35230f14237872211e56539f3892b02b59a0e06ad6400fa000b13c659b6286065294337c73749f6c51aca17f22ed5d69
+DIST uv-0.10.4-crates.tar.xz 40639148 BLAKE2B 3cd5b71f5e276b0df754d452014e068eefbc90ad15888e130de0678f7e423ec2c28fea97d4ae896e0b6104ba3fe67a62ad5e968fab1fb5064b618df00aafde18 SHA512 c7cbfd337f382b759de159c7dd1b28419228ad18d3da1fcbf16e23eaaec0dd02cf68f16d6ed834b1046700702d22b4a1448de20440889078f5aab4750fce921a
+DIST uv-0.10.4.gh.tar.gz 4944819 BLAKE2B 2b450f9822454118d18720449cfa0ad07279bf35077e61cc7212fe14a919468c35c7ce50c6d458049536b25b3e80fbd5d710c74c8fad45a99db58152acaf3d8c SHA512 0ca01e6d42ac1e773b0366b9ffa44806ec4c19a920f9c33c9d6cc12dbc60d7564b8667bce85628db1e571b7c478bec3946c48875a42f45f77da6be78f2de5f37
DIST uv-0.9.15-crates.tar.xz 46539408 BLAKE2B 57e582f56e12858292d1dfaec10292eb58fb118051618875eab0d2dcd4f55aa89de6f788b3aa5013ce5e03068bb404ef04faae633d5c208f382366ac5ddf70df SHA512 4db7549d6902682db7af385e5099e74bbd82e54aaf45a44fe64416fda91e065f4bf978b9db55ab72f2872f9e8933b49020102b959c1d2bcef4b9a9877ac1e789
DIST uv-0.9.15.gh.tar.gz 4887603 BLAKE2B 422a3c004abdf052438b145400675010b1adfc8cb8d49979367544e2d381389594188276fe603ffa983f5926be624f5d863053bd79342eeee10caf1260b2a479 SHA512 2605e2e7d5f6fdbb5ec4839363f65c8e71559944ec003cb9c69040be08094eb5c041831151b669e2dbbcf1799e862f484a21a592090524f79686469eac0e3381
DIST uv-0.9.21-crates.tar.xz 48642776 BLAKE2B 4ce225a3639d02ea05014c2132a7fd8baf53f3bd0bf3cafc6ebde144f2cea982426835f91bcb587e8dba122afe381c5a0ffa654667d4677f0b0b18b4b63a2f2e SHA512 db391109602bf1afbe868740ee977e76f92911136f61a9db8918ca89bcabdad02b75f1892cef200a370ea91829e177fd6c775aff9522f72fb90f2fc9d3acb22a
diff --git a/dev-python/uv/uv-0.10.4.ebuild b/dev-python/uv/uv-0.10.4.ebuild
new file mode 100644
index 000000000000..73993f9a17fd
--- /dev/null
+++ b/dev-python/uv/uv-0.10.4.ebuild
@@ -0,0 +1,164 @@
+# Copyright 2024-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+RUST_MIN_VER="1.91.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 CC0-1.0
+ CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016
+ ZLIB BZIP2
+"
+# 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/pkgconfig
+ 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
+
+ # 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
+
+ # uv is now forcing bundled liblzma, sigh
+ sed -i -e '/xz/s:"static"::' Cargo.toml || die
+}
+
+src_configure() {
+ local myfeatures=(
+ test-git
+ test-pypi
+ test-python
+ )
+
+ cargo_src_configure --no-default-features
+}
+
+src_compile() {
+ cd crates/uv || die
+ cargo_src_compile
+}
+
+src_test() {
+ 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
+}