summaryrefslogtreecommitdiff
path: root/dev-python/uv
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/uv')
-rw-r--r--dev-python/uv/Manifest3
-rw-r--r--dev-python/uv/uv-0.5.29.ebuild170
2 files changed, 173 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index dcb43d50986c..84b4f02817cb 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -9,7 +9,10 @@ DIST uv-0.5.25-crates.tar.xz 53882356 BLAKE2B b0762449534ccf0be33d2c4d50fd9bc018
DIST uv-0.5.26.gh.tar.gz 3353978 BLAKE2B 1920825eaf2d2eca3d5e5fdaba9677e08f6bbb6d1b078a3ffe706f1344ccd9de19237c0470cc902a06f5fbfa9bad0af51c67a10141e76c9f9f182217c461c094 SHA512 e723775465594959b8e70c1bd43f0ddce0b8d64d7ddb157f28385593aa6c40153b1152b2c22534862da0605e2a0ccb7dffd1f95e07d8003eb37433bb3b887b73
DIST uv-0.5.27-crates.tar.xz 47539520 BLAKE2B 701e7bf284a3506555a6da6ccc0f3aba5161305b4acc065f68c14ebf25f79a8bce3739589e5d3461aa8d058860d387790e6f007ce74309c03c1623574ef15c85 SHA512 fe276c9cfb0d07d4ba56427fde7067480f32cb21341b3967bfa65217e94d78992692808981dcd321731339c81ee7a44cfcd103557d63ebd727c04cbc403217fe
DIST uv-0.5.27.gh.tar.gz 3356614 BLAKE2B 143d1ee171a46a4bdedec79767f04973233ba389ed053358383834f9b6fdbd2334ce695adc63a76f3ffcc92427739bfc4adbf57b19280f98c1904b607f2ecbc2 SHA512 ce597666983b24e85992cf7aa313506255d58b97ac0e98300c5f01f8418a71e2c7357b9fdbd2cd1b56b3a8cfff13d3014f18f740e11561cd4eea03438efec990
+DIST uv-0.5.29-crates.tar.xz 47545324 BLAKE2B 880a4c51619031cabd6e375373e5a1a99f0ad344d08fd0bca4bfdb3b7c72fe4a23e34cad93167c23c7b2e7b09e350ae4e0b832786e09246f297aea146f9cc3fc SHA512 fa6489400af45462dc59ccd35a8c942dc635bad4ebf7481cc2eda585147a6016b17eca42ef6d0fa233d714def6d56fef205abe4782aba4610c324fd2825eef62
+DIST uv-0.5.29.gh.tar.gz 3375616 BLAKE2B bce1af0353271f8c0ecf073286ed26303953920f68fdb3e24aa7f03926dbc0a9165e93ee2b92bc554ce5eeca3c2d40413e3eee5c83c85dc85da7f737a9af5cb3 SHA512 ebcc2f4d25e800fdd864b1aa64ed0c2f7e5ab2f9e4a80e43f7ecc27d4a0fedac1062644bd954e15b39055d562ec2366c089a934fd65bb103cb50e2b5414a6d97
EBUILD uv-0.5.21.ebuild 4335 BLAKE2B 40b0e66263df162330f16c62e589f9aa3112956672378daca8ec7deab186e3ae37762abf7a19833abeb8cd33aed4b831b8279fdd4a7d70c48b7d5f3e637fccfa SHA512 796394628dd1126364e8aedb392b6fb5c6aed92b420673ceea400bb832469f2774ac4432b5608a450d45e35dda8dac24e4d2d710e00b77bccfa1514cd162f784
EBUILD uv-0.5.26.ebuild 4374 BLAKE2B 2fbd5f7eb017b5f676405740a46f1e507555304e86d676b07ee74d616ad3a8b8eb0954d147745715208c34b4c476fd9abdada27a04de06c474b0ddd774a54861 SHA512 cc2cb523daa7bd7f030567a2c5070d6b30e8e45129f90d5e904c71e22ce65874fc61ed10342c4e315a480b96b4a8a8dac82dde199a02964aba2c9ee07a81ef14
EBUILD uv-0.5.27.ebuild 4495 BLAKE2B 58b6adf43b9a7647d35bb39ef0ec443a5cb38a59fe4dc47a11030e3d8c146c5ef2ac69e13f4d055968ecb6f750c80a73c2988760a799bf60b0da8701e177f4d9 SHA512 d2c8d7fff3f3f0d77130cad2d82f8c8e0b023f4b4ff5322946ae1a556672ca5575e5127d4f80e6a8ad36555c9182eee49a460c6173cc7bd584deda8c02945ead
+EBUILD uv-0.5.29.ebuild 4374 BLAKE2B 5cf42a19e0fd4c2304147c3bef0a5ab4b0f4c3987675abe1300730bfbdc1e0a10278c87b615e13205d38f05b6ebc25c7ba972881adec1cd10bdc8b59f76680c1 SHA512 371967687c06f0b7f85892047f294da442447c91523cb22887301bf860e7f5151d7d102311982fef5bf798e4c00779764fa748b4277621f837f016fe6e603f4b
MISC metadata.xml 336 BLAKE2B 4b5933e24e3e9450dde5da099185dcdf3afb5916b55cffa7c2f3f6fac77e439197cbe4ba529a87f83442d8f87d238e8abef06dc052ce9a62659060ffea9fdb47 SHA512 9910fd10ebbc395b9c330774b74798c9ffdba3bb368347658380a22e01d6dc9d1961ea50fbfb4a904c9db84b94c713c054e418a7294425b86ff41a607fd3e310
diff --git a/dev-python/uv/uv-0.5.29.ebuild b/dev-python/uv/uv-0.5.29.ebuild
new file mode 100644
index 000000000000..d917efbee3a8
--- /dev/null
+++ b/dev-python/uv/uv-0.5.29.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.5.29
+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 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
+}