blob: 39fada98c1d0d9e9e7b34f430b1de5846ba84916 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
# maturin compiles uv-build executable for every impl, we do not want
# that, so we hack hatchling into installing the Python module instead.
DISTUTILS_UPSTREAM_PEP517=maturin
PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="PEP517 uv build backend"
HOMEPAGE="
https://github.com/astral-sh/uv/
https://pypi.org/project/uv-build/
"
LICENSE="|| ( Apache-2.0 MIT )"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-python/uv-${PV}
"
src_prepare() {
local PATCHES=(
# use 'uv build-backend' instead of compiling uv-build executable
# that largely overlaps with dev-python/uv
"${FILESDIR}/${PN}-0.6.9-use-uv.patch"
)
distutils-r1_src_prepare
cat >> pyproject.toml <<-EOF || die
[tool.hatch.build.targets.wheel]
packages = ["python/uv_build"]
EOF
}
|