diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-05 02:07:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-05 02:07:17 +0000 |
commit | a6764d56b1c85c8272783500983011c143c72d80 (patch) | |
tree | 4012d67c099814931c6188b22a6b5eb4e77f1d6a /dev-python/uv | |
parent | 38ecaf88ae0891dd2d7f2bdd9a7acdcd45835724 (diff) |
gentoo auto-resync : 05:12:2024 - 02:07:17
Diffstat (limited to 'dev-python/uv')
-rw-r--r-- | dev-python/uv/Manifest | 4 | ||||
-rw-r--r-- | dev-python/uv/uv-0.5.6.ebuild | 170 |
2 files changed, 174 insertions, 0 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index faeadac8a697..f844048ec0d9 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -1,3 +1,4 @@ +DIST pubgrub-57832d0588fbb7aab824813481104761dc1c7740.gh.tar.gz 95600 BLAKE2B 8bdf971091d6816c326925c4603aa9296d6a92c2ede6a6245e0e5e64b741863e5d93aac03990004c13bd592d3d6ca2c662500e4c8d33e9959d6df9e1023a41e5 SHA512 8eae3c00928d921ca7cfdeff124962e477ae32387fb4b1ebfecd968181ec6bb2c2d96c918d8a9f521f1b9666eb6272c9f982b444d22a432f9471414f081694ee DIST pubgrub-57afc831bf2551f164617a10383cf288bf5d190d.gh.tar.gz 93839 BLAKE2B 14253f61758d294b4140bbeacf4ab169e4e653eed1f8b36269a650962bda16e867a16b21b1f8304323e776d9c6714748807b69a29807378579940ae1ddc0d626 SHA512 1423aa1f2410ed130cba2d663e0bba4d0a27db53cec81d389fdfe08c196e203fc7212b73fed2aa8c382306093d1a38c8def069e5adc0fc3506ecefa820c825ac DIST pubgrub-95e1390399cdddee986b658be19587eb1fdb2d79.gh.tar.gz 88127 BLAKE2B 661b639a7028b7dfe4967b4e2f187c3d403e1796bb09ae4606854414547cf81a5907d7dc9c1f8c3f6fe6986b1c8c22a89fee9e93d2ca79d5241350916991cf05 SHA512 8fdcd1ca1badbd140eb386ff37dd91b26d2b81273544b25a376462b900e9b84e59523ff75a68abe4a03834d72ee0d44246f16aea5c7e9091ad5375a86d3aee70 DIST pubgrub-9cd9049a64c7352de2ff3b525b9ae36421b0cc18.gh.tar.gz 95485 BLAKE2B 08db87c7bce1d6553e23fda3a4ab8d259d09ef50500846fbadae3c24841d7df0af40b052448d71f52196bb2da4ce0428ad9ad6c43dbede2910f39e602c168f6b SHA512 1ea397be9ecc236c275706c8bdd9c6f9baa9852fce30cdc7009bfeff43ecc745391c3aa75784f1a39bcc8d77b9687f028a494610af632ab6e8a9efbc88ad1653 @@ -11,7 +12,10 @@ DIST uv-0.5.3-crates.tar.xz 46488584 BLAKE2B 896f56ca633f3bdfb167df1a93c12358613 DIST uv-0.5.3.gh.tar.gz 2908026 BLAKE2B 0b9393a5d0cf8833e3e4bd9cd3374f689c5295053f02b4e750512f57a02844126d91e2538e044d4fac719a573ad13f592fe99ec1bcdd233b409e1dd9e32a3e9e SHA512 00afce159326a0551ef09d6e0fa82270b9baf40ba47ed3ef5e56b73e272f56d4d9a410fdc3e832989218c0997f7778a2d339b87171e69fed55baacdf2d48b556 DIST uv-0.5.5-crates.tar.xz 46246372 BLAKE2B c461c5140f7ffae63d16fac6c4069999c57d62095d4e4c447981edc63bb7d5c0da74b5bdbd60150abbf9a645430c52df4ec305e05c1025ce0603b221e01d32bc SHA512 3caba853e65b9fec57a4e3a260c57af8a38e7d9a73b09da22661a14ec329cf0ed7d1851a6804d69c750390edb59872c6d97b023557c48730bedc7ccd2b1b9bef DIST uv-0.5.5.gh.tar.gz 2932557 BLAKE2B 0a31c0529ab82ed6eb0cbb5595f6b00dfffa53c55b204adc70bec5bd1b22b1108caff9422d9ff2adb0ff17468ede46b9393639945b7cd11df2f03fd0bdb754c3 SHA512 0962ccf3b69be53e7d3d6b5d539b2b0c02dd615ab25913c3feb2701e1285e2e8c2fc2ba3d0dc361121ceb4cd439d7fa3a30ff82eb6b76ec23958a8a27154c88d +DIST uv-0.5.6-crates.tar.xz 46263172 BLAKE2B 73b1d2dc957f89f923dda09a8c038426041292c442ce253ff9110f996cd1e1f892a5a438d8e1c894fc0d823401cced0ddc8ad88b5e6a83199af7055a04ce85dc SHA512 c9d4f8085416bffb1e1872fd907d15a50cae0c0c5fba994d27b3acdc3c836dffd771558246573af4bb7467353a031ea56018d5ae1fbdffa4f63988462de00343 +DIST uv-0.5.6.gh.tar.gz 2952255 BLAKE2B b815b60b99f959751f5839365b8b210919247ad99bff93ee4d202bc152bd06b83a62914cfbf341bfddb5b2c87d9e546c5e2a6d1baff1599d0218160ee89de504 SHA512 fc8c7f4f60a3d2ce997341450daf20ad039ef379ac5dd4575f8db0327284bd8278419b66f8f9695f2701a9579ab004b5b60476bd8dc4c27314211f795118bc5a EBUILD uv-0.4.30-r1.ebuild 3614 BLAKE2B 9654a85e33048055476f675bf61b1e82a55b22bd08b14753e72372912aa20b74011f2c99c939607b5343f6f800cc8490a7afb323ef7f653d14d1dfce339f6e48 SHA512 0ddc3394f0f4ef685efa08e4b5f40d2615f74d8672cdd1c098c5edd2f0c0de7e65705979955584bdf359ab7eca75967b5753cea63aad117b3f876eb05dcf736d EBUILD uv-0.5.3.ebuild 4334 BLAKE2B d7d64dde25c7b9790d266e7f47bf388c7418fee30f6237c046af21034f8d53d3e85067099e6e039c94300515165de03803ca5f0982f84c4a49c2f053ffbd4dbf SHA512 6c6f36b63d7a6a76ceacbc65513aeff40f581b15b300ca6e81d8a09f7551c063e39e068c0f6389367f1abce96fb0ed2f8f0898737f9c99145d7f0c1635e867a8 EBUILD uv-0.5.5.ebuild 4334 BLAKE2B 23c8faafee406b0ca37f2ef6332cecb85d3bede9e105ca42331d2a86bc8a076c40214faf844c8a4d621fd25a6c03bac4264ab1ba787b4fd6df6c8d280b36207c SHA512 da79aeaff92a1594ba3ee1f157ba10fb7649e7743278d6d69d8c3c41cb12ad0d1c094979e30434471674978f045b63a5a5ceedb7a9cfc708637be5201037b209 +EBUILD uv-0.5.6.ebuild 4334 BLAKE2B 95eebf5f67b3419d6be2a5e63eb70e5b89f1cb5eec3c590468c61209f580115d4c5b0076acd8cf607806e0a0cfaf947e80573938e3dfae3bede94f7a0efd7d55 SHA512 7abe1a42c4e8a1e59b3f9f804da7893991a259edfa2465bd3485cf206a9e4e152190d9c553619ac5e32bd5b243acb72fdb6b43a47b74e00ebe8852e1155c551a MISC metadata.xml 336 BLAKE2B 4b5933e24e3e9450dde5da099185dcdf3afb5916b55cffa7c2f3f6fac77e439197cbe4ba529a87f83442d8f87d238e8abef06dc052ce9a62659060ffea9fdb47 SHA512 9910fd10ebbc395b9c330774b74798c9ffdba3bb368347658380a22e01d6dc9d1961ea50fbfb4a904c9db84b94c713c054e418a7294425b86ff41a607fd3e310 diff --git a/dev-python/uv/uv-0.5.6.ebuild b/dev-python/uv/uv-0.5.6.ebuild new file mode 100644 index 000000000000..c67a480aec6d --- /dev/null +++ b/dev-python/uv/uv-0.5.6.ebuild @@ -0,0 +1,170 @@ +# 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;c909fda63fcafe4af496a07bfda28a5aae97e58d;rs-async-zip-%commit%' + [pubgrub]='https://github.com/astral-sh/pubgrub;57832d0588fbb7aab824813481104761dc1c7740;pubgrub-%commit%' + [tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%' + [version-ranges]='https://github.com/astral-sh/pubgrub;57832d0588fbb7aab824813481104761dc1c7740;pubgrub-%commit%/version-ranges' +) + +RUST_MIN_VER="1.80.1" + +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-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 +} |