summaryrefslogtreecommitdiff
path: root/dev-python/uv
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
commit8796aaedb3257bbe4d80b0033408b2210b2259d6 (patch)
tree1ffee2ca4a87bd5dba43077259c000f9086fbfc8 /dev-python/uv
parent61a1cada8ceb208845fa604b982216b0a7b099cb (diff)
gentoo auto-resync : 17:10:2024 - 04:04:26
Diffstat (limited to 'dev-python/uv')
-rw-r--r--dev-python/uv/Manifest3
-rw-r--r--dev-python/uv/uv-0.4.22.ebuild145
2 files changed, 148 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index ddda6309a31e..2c3b6a8a5cca 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -7,6 +7,9 @@ DIST uv-0.4.20-crates.tar.xz 45729496 BLAKE2B 75dfc41917d92a8017cd04dd763ce52c36
DIST uv-0.4.20.gh.tar.gz 2682849 BLAKE2B 8b4c6255d62817c12bdf71c82e28bd18254808e0ff836f483093b9ec948d21c5935a52cccfde1452a0c907d5a46ca499215b59112a73ef71e1c62e4c70697826 SHA512 adab44ad4395c9462e14d4c8974a0971cb7d90f18eae52820456b44cac83bb4e780ea4a171815cba15ef284998aa7e8da239c79ea82c0c211832460ad8e37067
DIST uv-0.4.21-crates.tar.xz 45656040 BLAKE2B d3146c4320aee523c1853e0257d517744791a8a2d6e736b62613a9cb99727c0ceef04dcc9ac744129518a99fffe7793567dbee785e1b82af188c5c62896bca61 SHA512 7a831b6566e39fdf06c886302cb5ce6fd65c961e5d3dff2c71fbc3f2c83e0b903adc8f032c78c4caf6f805bbb8fa06fa331b8be531bf739977619c6eac2e3235
DIST uv-0.4.21.gh.tar.gz 2707247 BLAKE2B 6610c99a31c5f6d6683a9dcfc4e23bb9e422709c479739c1e485060eb4e269d693306f4e17465b2f04b9cdbd833540a2fdb949d561f695336195257aa144ea3f SHA512 52f1a0c295c8250f78739335be0e5817509f6fb9fa2c58980cf1ab4ef1abf3e113b4b48093867573bb9d2ae00cd868d281b4d71ad44eb8e672e345b3b322426e
+DIST uv-0.4.22-crates.tar.xz 45654940 BLAKE2B 37fdf3512ca67f774a300b269aaa1748441fc9540b6393ba75d40772bb951aae9a671e9690860a952f4505121f576f1470a79cc13ff01f2b47328f4cf1d48991 SHA512 90f318c124bf23c4c1c19261219dcb873cf5744dfaa1553dd7a536674157a269c18e7a63c118aedc635e08a2cdaaba9d9afb6e435e600237c3da1321636690e7
+DIST uv-0.4.22.gh.tar.gz 2721833 BLAKE2B 8687c67d39006636665b8dbd8b6c92003aa5e24311a6b42f39b176820ba4d06ee6fa578e6be919e43647df145e57d2f24f92ad0b2633ce83a7e46b6e5654fc73 SHA512 ac663e4c843a098c7f314ce2107b30e92b086357a6e25f82cfade91458b7cf63a4d2e66151393885038d5a60eaebd995366b53b78f2ee65b56b2abbfb8f6b6c7
EBUILD uv-0.4.20.ebuild 3467 BLAKE2B 528e53bb43cd373d75699fe65e2ea7aa2a953075296500dd4598a84ff6d7cc7dc09a91f5d0de380b05a0a4c88c03b674b60eadf6a4a41b94d0fccda528d506a9 SHA512 f2b231c57e4785b87e5ec61cf1b54dca35766733321054456e65bc9eab7d1164ed07022ad5672b6d5fce1ec81475b39c1ae354951ba5bbc63e53d711c2c9c4cf
EBUILD uv-0.4.21.ebuild 3575 BLAKE2B 516f163ea2dea5a7b946d61fad2b80c733cdfd70ed1188c5cac14c0123013427429b4b32c16923b16dbe7e280efe063028a1e96718a460a533d9b296092128d8 SHA512 f13f45396a6c85ceb4a5ffb09ed57b644a23335ff4bb5ed33b00f39d0f896aed3223a523787acbd0435eddd5c2e836ecb9672fff814be6640d73799e061a8df6
+EBUILD uv-0.4.22.ebuild 3574 BLAKE2B 36d6d741997568c476f6528513d0bc8b890b0e0780b375c37df39b6d6178a30a5d85f3ce7f1ccfe834311ef48ffac952ceba56d206c5a8a15d43b573a975b42d SHA512 72f30282ae185ec18c06b8443204ba3158dca0db1486b679d6d78d11efe5070f54f59791a4fe59d212941e361543416ed6f0a1627e76180dd639911add410796
MISC metadata.xml 336 BLAKE2B 4b5933e24e3e9450dde5da099185dcdf3afb5916b55cffa7c2f3f6fac77e439197cbe4ba529a87f83442d8f87d238e8abef06dc052ce9a62659060ffea9fdb47 SHA512 9910fd10ebbc395b9c330774b74798c9ffdba3bb368347658380a22e01d6dc9d1961ea50fbfb4a904c9db84b94c713c054e418a7294425b86ff41a607fd3e310
diff --git a/dev-python/uv/uv-0.4.22.ebuild b/dev-python/uv/uv-0.4.22.ebuild
new file mode 100644
index 000000000000..e21074cbf13e
--- /dev/null
+++ b/dev-python/uv/uv-0.4.22.ebuild
@@ -0,0 +1,145 @@
+# 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'
+ [rust-netrc]='https://github.com/gribouille/netrc;544f3890b621f0dc30fcefb4f804269c160ce2e9;netrc-%commit%'
+ [tl]='https://github.com/charliermarsh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
+)
+
+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"
+
+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
+}