summaryrefslogtreecommitdiff
path: root/dev-python/uv
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-07-22 03:04:36 -0500
committerroot <root@alpha.trunkmasters.com>2026-07-22 03:04:36 -0500
commit63ccd2e4ddd6295605ea83ff6f5e2337785496e5 (patch)
treec2e8b95c36b14703e41de0de4fe7cb686ee24eea /dev-python/uv
parent805088e14f2164ec415b97288657da8492869f97 (diff)
downloadbaldeagleos-repo-63ccd2e4ddd6295605ea83ff6f5e2337785496e5.tar.gz
baldeagleos-repo-63ccd2e4ddd6295605ea83ff6f5e2337785496e5.tar.xz
baldeagleos-repo-63ccd2e4ddd6295605ea83ff6f5e2337785496e5.zip
Adding metadata
Diffstat (limited to 'dev-python/uv')
-rw-r--r--dev-python/uv/Manifest2
-rw-r--r--dev-python/uv/uv-0.11.31.ebuild163
2 files changed, 165 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index 7f5c265ffb0b..781e7797fc05 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -20,3 +20,5 @@ DIST uv-0.11.29-crates.tar.xz 43221288 BLAKE2B fdb0beeeb0eb6afd6c5e6a401f34dd733
DIST uv-0.11.29.gh.tar.gz 7390745 BLAKE2B c4366c7fe66a14246ed95734d605e8c02f2da336b3b5e93be67a0d7dae99afd3b9d15c9e59b79ae17ffb2d43f90718a72e6160a6cd422423c149fce5c45b2e77 SHA512 27d5f0f40aed962468bd3d80f04f792ec4698db9ec0930564dae25ba7a743430b04b4aa5b2cca92883b7544369200a32956337b04bd558dcc8b1ae4c5a3b1a0d
DIST uv-0.11.30-crates.tar.xz 43265592 BLAKE2B ccbeac888d7902a32ea69d5a04f02deeed6930a98412200c07b3badde7681cfb094b520920610a57d5671979eb814ecf36ae012c5a2a4e273715ce6127900ea8 SHA512 eee68f12601fbf20ef25aca96f12fed2a7a26b5dac8d0c7129ce558ffbff80c1f55daa9879943e889d25afbaba388ba5f187b4f2ee5e753c02ed3e68592748a1
DIST uv-0.11.30.gh.tar.gz 7407810 BLAKE2B b999322f54e4180a1301823e5ce1968d07b598f48a5ac5c4b8572009417be0f6ec724dba5595353fd026c6e0ef4fa6beec450ca06bc4c0f21b9260823c45bafb SHA512 40d35103b86f17ba0315cb0ca6f74aca5b004cd7b9a0e30efd089e048fcf4e213cd6c8752064595b45dda7e6eaedf0bf6d8eadda1fb93ee3a653897be6f23d7a
+DIST uv-0.11.31-crates.tar.xz 43219524 BLAKE2B 0bcf077c48985bc4a790757b024299497c0577dacd311c2dd581979f08f797bf87010796c8f5a0bd2cf4f4df278f949ed520aac350e5ec7e75a7bd302544bf77 SHA512 ad2cf08b2ef5b38a0bb2dbd89db4039bd07ec95860611528dfbb226706443e3ed63719b9d77ca80459cf55c59188b4d57c1b13f058aea229ab81c104544c028a
+DIST uv-0.11.31.gh.tar.gz 7422584 BLAKE2B bad5203ebc82fbf382c3c72ef6f2b284d46f7b9594992ac6d4ed676335a5cc94dca3dedcb5d164463a6c2c4ca6d19d43c93037326f38dc5314d29c561368f5a5 SHA512 7ae3789adccaf9fafcbb55843c719ff7167d33905587a34b2b423d04203204dcbfa9fcb8c6584ff10400d26ea71e8f44999c420511bd992ea7dfb25504b68d09
diff --git a/dev-python/uv/uv-0.11.31.ebuild b/dev-python/uv/uv-0.11.31.ebuild
new file mode 100644
index 000000000000..ed03ea27cebc
--- /dev/null
+++ b/dev-python/uv/uv-0.11.31.ebuild
@@ -0,0 +1,163 @@
+# Copyright 2024-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+RUST_MIN_VER="1.95.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 MIT-0 MPL-2.0 Unicode-3.0
+ Unicode-DFS-2016 ZLIB
+"
+# ring crate
+LICENSE+=" openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~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() {
+ dobin "$(cargo_target_dir)"/{uv,uvx}
+
+ 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
+}