# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=no PYTHON_COMPAT=( python3_{12..13} ) inherit distutils-r1 DESCRIPTION="Fast diffusion-inference kernel library (RoPE + FP8/FP4 quant, binary wheel)" HOMEPAGE="https://pypi.org/project/comfy-kitchen/" # No sdist. cuda selects the host architecture's abi3 CUDA/Triton wheel; # otherwise install the portable eager/Triton wheel. Per-arch URLs fix arm64 # imports. verified 2026-09-09 SRC_URI=" cuda? ( amd64? ( https://files.pythonhosted.org/packages/db/5d/7df83ccb2b3fc4b9660dd337dcc56f7c65926318ae0303840a1e5b72493d/comfy_kitchen-${PV}-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl ) arm64? ( https://files.pythonhosted.org/packages/fc/7c/bcabb37a3401163dfe6e61042206e44470072ee9088b4330518a2715f552/comfy_kitchen-${PV}-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl ) ) !cuda? ( https://files.pythonhosted.org/packages/27/d1/e53410260b81610233cb56c2fac1a9f3d39887be3cbb983cd8baa6a07528/comfy_kitchen-${PV}-py3-none-any.whl ) " S="${WORKDIR}" # Wheel LICENSE and classifier specify Apache-2.0. verified 2026-07-01 LICENSE="Apache-2.0" SLOT="0" KEYWORDS="-* ~amd64 ~arm64" IUSE="cuda" RESTRICT="bindist mirror strip" QA_PREBUILT="usr/lib/python3.*/site-packages/comfy_kitchen/*" # ComfyUI unconditionally uses apply_rope; the package also supplies FP8/FP4. src_unpack() { cp "${DISTDIR}/${A}" "${WORKDIR}/" || die } src_compile() { :; } python_install() { ${EPYTHON} -m installer --destdir="${D}" "${WORKDIR}/${A}" || die python_optimize }