diff options
Diffstat (limited to 'dev-python/uv')
| -rw-r--r-- | dev-python/uv/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/uv/uv-0.11.18.ebuild | 164 | ||||
| -rw-r--r-- | dev-python/uv/uv-9999.ebuild | 2 |
3 files changed, 167 insertions, 1 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 7c87dde6e023..e4e3a8042c08 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -14,6 +14,8 @@ DIST uv-0.11.16-crates.tar.xz 44976320 BLAKE2B 4d044d570cb5cd24ab59f2c66e82f1b8b DIST uv-0.11.16.gh.tar.gz 5318655 BLAKE2B 3b818282877d727ea4d6e176157ece28c0cc97525de49e523934b57e0a35399c8d2fb8642261565a9beb6f7f13d0776806207803569229e9445633822bd5aa0b SHA512 c830b9808eeedbfdcbc8ee75ba978f9309b89f1740aa3d363cc661c42ea066b87d3d21c8cc4ccf215e8233ea3b4c2669537ffe5955cf68adf7367755428618bc DIST uv-0.11.17-crates.tar.xz 44959296 BLAKE2B 67b39c5547e6809b4788d7945d635e5a793632be67b60c7767e8ec9157a3fbb3c1321ee7d2f7d091a990b7be2ed06335ba8c0dd487a03fe6b16a8954191d1aac SHA512 c45ebc83cefedbea71d5a5d92650cea377f5fc53c53eba2d1554b35b8038624ba7d00378961d41145601b54a5b2b8d8da3e5e68348ecf3a244146419ae05bc6e DIST uv-0.11.17.gh.tar.gz 5349885 BLAKE2B b38fd4e6a4f0fc33f3f8f63ec235e1a586fd481ca600de3869366ac257fb6ef2a98da554b8ee06be03dd883d53d24de061cd771780006c0bfce5ea501b3414d0 SHA512 ff5aaa75585fb23d4de034e0519b333e031551e360863a9de6be551f1f8f90afd528c16ae7699b303bd4567b93cf6d322c33472bb278b9311e83106cf783450e +DIST uv-0.11.18-crates.tar.xz 44929200 BLAKE2B f72160cef10b9a6e8e7cec3ac967a8fedc13c78eb1e2b4a65ec44b9e53f4bd08d653da7c4910d9cf978273fcce64dee378b9afe12f7736e795407f39df8d81c3 SHA512 bc8d0535f1b45d50996ffc422a09133c05f270fb01dc2c227d9fb3ba04ebd1153b98638cbf5ad4b4e2d8725508500c3052e3dd5f6951a97d8df4eab5c574c631 +DIST uv-0.11.18.gh.tar.gz 5355670 BLAKE2B c826f9f96fcc62015ea51fe6836f07057156777b6808228eaaccd680d121cf78515f722b82801389d5189c5332b4e9b4bc9a7df6351ee908835b5031b0479378 SHA512 59ef43479bee5cc36dc5966ef5ec7bacb22e17d831ee2a0f8246d73c432cd0da76d230882afc08b31b610f92c333547285af420597f3f696a8acc30107cb2141 DIST uv-0.11.7-crates.tar.xz 46854096 BLAKE2B b4fc06608d3c68910a48af598803b934017787bbf14599f66fa43096aa3ef2cdeca8ee35230ea3b8446da044a29f0b476f58f224732959e8017720e79a0d7cd8 SHA512 9cdcc1f565a3bf4d3490296710a7821e3760164d723057d591bf923e093aac50f51ad209ceed6f8c4e8fd2104ee90363750017bb56de2c76fca5dda7fcee815b DIST uv-0.11.7.gh.tar.gz 5220735 BLAKE2B aae6d54fb59def30a517b4b4a1df524af346128a601e8a016dd9f4df3c49733c835e9259a85321f7dd1bdbcad93e6c53a5568521419e213a977653c9d48bde81 SHA512 f9b34b628ac035cacb36bd9cd7276d28c59f768360a197f4c1c036a81651aa6c40b17656c4b5230cc19b496c415687fc99f05bf4c66459e5457f5cef105b8d7e DIST uv-0.11.8-crates.tar.xz 46751616 BLAKE2B 1b7772787035387868d4ec4ae3383c5e04ec70daaa25241bbdaf1699b3ee24dced7c5035a764be6c9179a6a94c4f21d1883ee7f57ce3f6d0184900ee3d581c40 SHA512 60a717024179a76c69a7dcbc58733854148ded16eef07b0607bdc37d714ac754869eec6ac48528c03782645f1c0a8692f8ec1d4997e2ff9b09748224ac96f897 diff --git a/dev-python/uv/uv-0.11.18.ebuild b/dev-python/uv/uv-0.11.18.ebuild new file mode 100644 index 000000000000..278562102301 --- /dev/null +++ b/dev-python/uv/uv-0.11.18.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.94.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() { + 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 +} diff --git a/dev-python/uv/uv-9999.ebuild b/dev-python/uv/uv-9999.ebuild index 6f2b51a4e643..b87ccf76f3c6 100644 --- a/dev-python/uv/uv-9999.ebuild +++ b/dev-python/uv/uv-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -RUST_MIN_VER="1.93.0" +RUST_MIN_VER="1.94.0" inherit cargo check-reqs git-r3 |
