diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-10 12:30:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-10 12:30:41 +0100 |
commit | add278b9601ff9e4af091c91c851ee46a185be8f (patch) | |
tree | 4b654beae0eec584ae1d1f3227a57607d591a0ea /dev-python/uv | |
parent | d8a7472fc6314625f7d16e0427004eb448412908 (diff) |
gentoo auto-resync : 10:09:2024 - 12:30:41
Diffstat (limited to 'dev-python/uv')
-rw-r--r-- | dev-python/uv/Manifest | 3 | ||||
-rw-r--r-- | dev-python/uv/uv-0.4.8.ebuild | 142 |
2 files changed, 145 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 5708a5cc735a..4b1fd04b3f29 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -6,6 +6,9 @@ DIST tl-6e25b2ee2513d75385101a8ff9f591ef51f314ec.gh.tar.gz 37106 BLAKE2B c30d1c3 DIST uv-0.4.2-crates.tar.xz 46277420 BLAKE2B 9f516f586a5e46bbd6c09e116f91e90b563b4de89b2d2dac50f208e4116583ba05418baa998a74f6d31503ec56cb5ff5966cdf579d026c53bcfc500b5e4fb15c SHA512 b30b70225eae9a5970dd18d383d9129b5161cb66942af8796220fe7a58cd3357308111374193d8fc4e1c7fde8a0b62f44e8efd76603411d882df016afecbc69f DIST uv-0.4.6.gh.tar.gz 2553065 BLAKE2B f793c01042db0a45b53a57157852ed5035a96bfc58c2cf81eb3d6a59b9eb6315dbd675817e1bca0a34f9d348d10c0668f9213fd11f230f606386405ee4d51c31 SHA512 79b50783596c6307934c378f7f7b60628de3edd8fe75f6675efd406e7e4cb7cd049a3966eefcb2708f8ab925ee5b5e315f6540f2c25693ffe1ee29f2d501523c DIST uv-0.4.7.gh.tar.gz 2558161 BLAKE2B 5508af9b6e0d04d165aa3b120be138fb4ccfddd643395175e5d31618ec34a5139567c0162b0ce1c741fed551397d1ec9d9693ce0397d1f0346a5c1df13c20b8d SHA512 8395f96eb36c2131b203de9991b994532047b7928ac1765a426accdaae4ed3a242a8b9554808123f5359d41778d3e7783606265b60d372bed2a0a76fea027e3e +DIST uv-0.4.8-crates.tar.xz 46272636 BLAKE2B 467c146c8598863c62a7a210f3c20a6a73dc318651d730803eddd5e1ae54eb815b0487e991cc4e2d493813ea6e6e8622ed503d952a63ce7ee3aa9cfbe4d36439 SHA512 b207acd6fa7d7e95d7e0b3201d9d0ae2457d427f866eb292c6e097444e6d596455e1478813cfcf6851abbe936709d4afa155e0c55367a3f9fb25d4387990a84d +DIST uv-0.4.8.gh.tar.gz 2569754 BLAKE2B 413121093c1a30e75afa62f5dd6496e3686c06e956ef1d633740d498387a7b0c5272b811daf3efe10d5ba95fd628f29ff3e7ee914df03069bff287dce0c96caa SHA512 e1a728d25ca9400ddf7a005da94d217631ee2a1a2b6b2b8421496496ac9379993dc81d8603f523308a9d232a1c20058149868cc413511ef7d3c7a57bd9354938 EBUILD uv-0.4.6.ebuild 2938 BLAKE2B 4c418853746d9d098e3558c8dca06ac539e32c937b7c6a754994bfaa4014b87f3478cd7b7934c05529d642b856a8e270214fe950d81b75b479352db620669160 SHA512 373267d4f0ea6d399ceb921358004c153c791bf4d205ff699b6004a7e1666da99235c5c67b088e0571086863deefcf34e95a3a71c36dc4f879a94f51b8868ca9 EBUILD uv-0.4.7.ebuild 3695 BLAKE2B a429e8ba6fe4e6472f9d625b918be97ad643adda9815ef4e1649665cac532974b1d61399cedff551acfb1068b8260cbcbc2a274cf3003b12bc3ee49af2e88287 SHA512 8e1ef3d836d40de0b3abe9fd0873f71277d42cf90f62fc23c08fcb6eea5cbc57af53c46a8acaa9d3aeb318cf86ef4627e367bb3f20a0a4056ad183fd27a2980f +EBUILD uv-0.4.8.ebuild 3695 BLAKE2B 2c96d9669eb0b8e101c14381fedef314818f332f36e8a1bca608bddaf182e84b90ffb6572cdd930364e2d16ff5e114f0d20fb9a27b51e9ee79d13785e1d1a455 SHA512 f1028cab66cfea0508886d782f37524aa4dc061b8c73a56b1e71ebd00cb3250902e0e748ee7190d98de75680a69f26afab38d9ba9eea6ec227c644da0d3c113b MISC metadata.xml 336 BLAKE2B 4b5933e24e3e9450dde5da099185dcdf3afb5916b55cffa7c2f3f6fac77e439197cbe4ba529a87f83442d8f87d238e8abef06dc052ce9a62659060ffea9fdb47 SHA512 9910fd10ebbc395b9c330774b74798c9ffdba3bb368347658380a22e01d6dc9d1961ea50fbfb4a904c9db84b94c713c054e418a7294425b86ff41a607fd3e310 diff --git a/dev-python/uv/uv-0.4.8.ebuild b/dev-python/uv/uv-0.4.8.ebuild new file mode 100644 index 000000000000..891f045cb8b8 --- /dev/null +++ b/dev-python/uv/uv-0.4.8.ebuild @@ -0,0 +1,142 @@ +# 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' + [tl]='https://github.com/charliermarsh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%' +) + +inherit cargo check-reqs + +CRATE_PV=0.4.8 +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 + + # https://github.com/vorot93/tokio-tar/pull/23 + # (fortunately uv already depends on portable-atomic, so we don't + # have to fight Cargo.lock) + pushd "${ECARGO_VENDOR}/tokio-tar-0.3.1" >/dev/null || die + eapply "${FILESDIR}/tokio-tar-0.3.1-ppc.patch" + popd >/dev/null || die + + # enable system libraries where supported + export ZSTD_SYS_USE_PKG_CONFIG=1 + sed -i -e 's:"static"::' crates/uv-extract/Cargo.toml || die + # 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_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 +} |