summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/uv/Manifest8
-rw-r--r--dev-python/uv/uv-0.8.24.ebuild183
-rw-r--r--dev-python/uv/uv-0.8.6.ebuild185
-rw-r--r--dev-python/uv/uv-0.9.3.ebuild183
4 files changed, 0 insertions, 559 deletions
diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest
index 4e533a9b2a8b..7d67742d574a 100644
--- a/dev-python/uv/Manifest
+++ b/dev-python/uv/Manifest
@@ -1,15 +1,7 @@
-DIST pubgrub-06ec5a5f59ffaeb6cf5079c6cb184467da06c9db.gh.tar.gz 99881 BLAKE2B 5fcc2d1a06eb44351773081de4f616c93301eb2fe71b0c6f7b95779ec4bd9bb6cccc702a87a6399b0674711302a19de3a96fa31044660430fd74ff549000ad25 SHA512 3f0b18aecbc73fee91fc7de9f10d240ddc06c836fa2f116c1f007dd7818d099e6aea1852ca0b8d1a26ac19aac896535dba1a6298851a65515b553810c6245784
DIST pubgrub-d8efd77673c9a90792da9da31b6c0da7ea8a324b.gh.tar.gz 100042 BLAKE2B cacdd77783aae1a94c3aaea56c2bd47b22f13ca34eddcef53b5d205244a213eff2934db03965532085c1aa6892b27bbbabfc19513f62936f8ac1faa466570dd4 SHA512 3a2a146fd9d9b458dced6563a1f5674e81e8ba36de11be5c189b0c76b6ede6f32957f48fb0978b97b0892768822c6c4c32c6870141e8fc1ea5d8b8f7d8b5b464
DIST reqwest-middleware-7650ed76215a962a96d94a79be71c27bffde7ab2.gh.tar.gz 42520 BLAKE2B ca415865947873f8b309f5b348a600677802fa8128a154b7c86d3e30bffece9df8606504073ddb688c5185e27866b5d7dc8a891e6d390ca075910a691e9bb2aa SHA512 904fd652b0f3ecc90eee571d5488aba977dee643a1d6267e2fda264fa4c7b4bfcfacd4d5a23287dfb710ecc82d667479fcd0c48166259c2368df0e8b0c9d6707
-DIST reqwest-middleware-ad8b9d332d1773fde8b4cd008486de5973e0a3f8.gh.tar.gz 41975 BLAKE2B db42a68b8f0d592edc297462c19a34caa068464b9a5f307e8e1c1fdacde95cd08c5af0f73fa55ed62217dee63940a1d02a4322c5edb2c2c8a568a7e04efd80e6 SHA512 2dad83835c87cdd79e2a08c19b5024b3fdf30d1d8cd14e480e434612e856ecc20a5404881ff81d5793d3e9d5808ee3d59ce920312a86a100535009da43d7d46b
DIST rs-async-zip-285e48742b74ab109887d62e1ae79e7c15fd4878.gh.tar.gz 37003 BLAKE2B c4aed18d82641ced2771ad8b8e800c45b1ded279e8ba1874ec9766907d042ae13b460beac739ced6e31c03a647e4238af96fb41e8c0dff4c5d4dd7f59c0ebbff SHA512 d6dd699f43ca6e23a4c8abb8673b37d3983081a8c78545492ea3c1d0b35e3a491277c341df6dd64fb7efaec3b23eb479dede99e9b41016b5504d1a6dc9fbc617
DIST tl-6e25b2ee2513d75385101a8ff9f591ef51f314ec.gh.tar.gz 37106 BLAKE2B c30d1c33f6f52e2bc83823eb6319f8a3e462b7c7408fb6a08f995747857ef234f81db4135a04f9d183095fe473a4087f8f0cb89d8f87ef4400285d2ce034ec22 SHA512 4abbc4240ed129c92da8d616e27a6df0f24cdc85a0803acfdae588ca91f9e5b8d482e3ac88b2e657ff68917b1b43cef1e7ef3c887f624659b231fa5a13fcae68
-DIST uv-0.8.23-crates.tar.xz 45766372 BLAKE2B 2637a9fe79fb647b74c8666b4574a94a98873e3d82d192fd941ad4e8cade231ff8251830dc6273a4355abc03cc8ac231d96125bef786f54b665068a13d5454a3 SHA512 df4b95502004d2bdec5ec3ee40e6ee8fef9b1744e4cf6c8944cff533f65a7edc4f9fa4988d768f85fbaf025b1dd2d2bb24bab903d7673247fad86741afa646f9
-DIST uv-0.8.24.gh.tar.gz 4711600 BLAKE2B 9939b7aff063e5e1e473b162e23e521d73d67d06fa4f2f7d85a267a322f7dcd71c75d08e594a45cb9713d79167e5fa9d4f2d0e64e02085d455c59e4dbc7fe5e6 SHA512 202e44296eb16fe9aa0f3f8470b5fa5af3489355462fa1de3544309d81ad3b97ddf8eb76a0f00db15aa07586f4279210a7ed1fe6fc868aa9fcf6f131f425dc99
-DIST uv-0.8.6-crates.tar.xz 46208952 BLAKE2B f9557a45fbfaa9d6006f935629130960b5d414cd185d7fbdb1415e7f3875568d07ade946a0b606712e9e2e06e7964bb0fb8318e02e78609899a852ed073b87a6 SHA512 c79fa70a6a670dc2d80efbf0b51942806b2b16ab7b4c63983ab634453ab32142322302bd68ab80f5bcfee08138bca8d04a7d152c76ca5d94bfc40255cab8477b
-DIST uv-0.8.6.gh.tar.gz 4255911 BLAKE2B 198ed83cb487f25a35957959bca32f98b8f5343712a7a9bbf3f817f189f1ec9c7903fa2e64ec65c9b3e18a469506c942ebb0ca50b39a353dc7e82228386fb69c SHA512 d164488e967364d254bab989933a5faf27c52c91da1bdeb6f3419fce335dfac5d4ea6cd717cac6b05fee9f85605cf21930c3d37119c49a98cb13c53d51ea996d
-DIST uv-0.9.3-crates.tar.xz 46057388 BLAKE2B 1fb8f46cdbebed4877d68a32e03932d3c7a5b552a455e4976feabbcb71280e3573a346fdab8e60a481e132367a9da671b44d30937534d992961a07154bcd55b8 SHA512 7331be26b967dedb2de3c873bbce0e7583ea21cc1cf6f09522c3c6539f50dd2df2fef6e59fce1d977b53d7568bcab2beef6e14df4730fcb77d6d10d989ecfb0e
-DIST uv-0.9.3.gh.tar.gz 4746738 BLAKE2B 9a1e40dab76aeb3d1378ecc373470ceba6eaf69d1a40bcfff66530857af88f2609d2e13c433142a9cdfcea97d7eab36d6b86f9673270f8b101ab9f4b3a4720de SHA512 1557b620c089c8871e5c3f9507c96a8aaf4f81cf6d3b8fe7b83fd170fcd9cd7eb2d404d6ee0cde92e4ec298817a0cb329bbfc0217525a1bd3745783bf909c56e
DIST uv-0.9.4-crates.tar.xz 46093644 BLAKE2B bdce4b138718b91a67ccb36e6d8839358ab2ddeeedec3017bc245b0717e32d890a41f8c9c831983681ec715ce458efa8d43356c189b9b7457df3e71122924e3f SHA512 7047b68db7e05abb6a399250a4a531499985d42f12eff61ad1557823b37d62576b38b51ccbe39a02bc9a98af6341de728466b262c49bb48dd30abb64eb804660
DIST uv-0.9.4.gh.tar.gz 4749319 BLAKE2B b46d44830f7a2a621f3ab420db85e9d999b7c42ddebc21403ea2f11e819e8295af37049f1529848a3fd83ef87ac0de26ce1e1c03bf4177c3032b9adfd6dfe1e8 SHA512 ae11c1e777e3d0e036f0a665e2edfb9a4b5b50a9e107d795113b626bc16d406d3fca12e8a133185e54279b2a64f8e3d276372cefc9a96b2ac5f1ed0ece2c10b0
DIST uv-0.9.6-crates.tar.xz 45696768 BLAKE2B 96cff52c0e5477c4e9648e3863d32bde4b34a1a46b6d96703c48fe340b655319e951471aa6403c09818c313a59b0e54804467efa7e13a8410de34299a98f077b SHA512 46964460f3404304faefd1758bb07bcddf1d48efbdd2b890ddb0d2623841e1a0c86108ac3c9312ed8e2f8fcaefbf9b022b57cd6074fdb6d52f43c35e3b3c2d32
diff --git a/dev-python/uv/uv-0.8.24.ebuild b/dev-python/uv/uv-0.8.24.ebuild
deleted file mode 100644
index ec686a3659cd..000000000000
--- a/dev-python/uv/uv-0.8.24.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 2024-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES="
-"
-RUST_MIN_VER="1.88.0"
-
-declare -A GIT_CRATES=(
- [async_zip]='https://github.com/astral-sh/rs-async-zip;285e48742b74ab109887d62e1ae79e7c15fd4878;rs-async-zip-%commit%'
- [pubgrub]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%'
- [reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-middleware'
- [reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-retry'
- [tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
- [version-ranges]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%/version-ranges'
-)
-
-inherit cargo check-reqs
-
-CRATE_PV=0.8.23
-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 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.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
-
- # replace upstream crate substitution with our crate substitution, sigh
- local pkg
- for pkg in reqwest-middleware reqwest-retry; do
- local dep=$(grep "^${pkg}" "${ECARGO_HOME}"/config.toml || die)
- sed -i -e "/\[patch\.crates-io\]/,\$s;^${pkg}.*$;${dep};" Cargo.toml || die
- done
-
- # 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
-}
-
-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
-}
diff --git a/dev-python/uv/uv-0.8.6.ebuild b/dev-python/uv/uv-0.8.6.ebuild
deleted file mode 100644
index 9ff97f90e629..000000000000
--- a/dev-python/uv/uv-0.8.6.ebuild
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright 2024-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES="
-"
-RUST_MIN_VER="1.88.0"
-
-declare -A GIT_CRATES=(
- [async_zip]='https://github.com/astral-sh/rs-async-zip;285e48742b74ab109887d62e1ae79e7c15fd4878;rs-async-zip-%commit%'
- [pubgrub]='https://github.com/astral-sh/pubgrub;06ec5a5f59ffaeb6cf5079c6cb184467da06c9db;pubgrub-%commit%'
- [reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;ad8b9d332d1773fde8b4cd008486de5973e0a3f8;reqwest-middleware-%commit%/reqwest-middleware'
- [reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;ad8b9d332d1773fde8b4cd008486de5973e0a3f8;reqwest-middleware-%commit%/reqwest-retry'
- [tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
- [version-ranges]='https://github.com/astral-sh/pubgrub;06ec5a5f59ffaeb6cf5079c6cb184467da06c9db;pubgrub-%commit%/version-ranges'
-)
-
-RUST_MIN_VER="1.85.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
- CDLA-Permissive-2.0 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.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
-
- # replace upstream crate substitution with our crate substitution, sigh
- local pkg
- for pkg in reqwest-middleware reqwest-retry; do
- local dep=$(grep "^${pkg}" "${ECARGO_HOME}"/config.toml || die)
- sed -i -e "/\[patch\.crates-io\]/,\$s;^${pkg}.*$;${dep};" Cargo.toml || die
- done
-
- # 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
-}
-
-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
-}
diff --git a/dev-python/uv/uv-0.9.3.ebuild b/dev-python/uv/uv-0.9.3.ebuild
deleted file mode 100644
index d134fbe8f1aa..000000000000
--- a/dev-python/uv/uv-0.9.3.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 2024-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES="
-"
-RUST_MIN_VER="1.88.0"
-
-declare -A GIT_CRATES=(
- [async_zip]='https://github.com/astral-sh/rs-async-zip;285e48742b74ab109887d62e1ae79e7c15fd4878;rs-async-zip-%commit%'
- [pubgrub]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%'
- [reqwest-middleware]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-middleware'
- [reqwest-retry]='https://github.com/astral-sh/reqwest-middleware;7650ed76215a962a96d94a79be71c27bffde7ab2;reqwest-middleware-%commit%/reqwest-retry'
- [tl]='https://github.com/astral-sh/tl;6e25b2ee2513d75385101a8ff9f591ef51f314ec;tl-%commit%'
- [version-ranges]='https://github.com/astral-sh/pubgrub;d8efd77673c9a90792da9da31b6c0da7ea8a324b;pubgrub-%commit%/version-ranges'
-)
-
-inherit cargo check-reqs
-
-CRATE_PV=0.9.3
-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 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.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
-
- # replace upstream crate substitution with our crate substitution, sigh
- local pkg
- for pkg in reqwest-middleware reqwest-retry; do
- local dep=$(grep "^${pkg}" "${ECARGO_HOME}"/config.toml || die)
- sed -i -e "/\[patch\.crates-io\]/,\$s;^${pkg}.*$;${dep};" Cargo.toml || die
- done
-
- # 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
-}
-
-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
-}