# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{11,12,13,14,15} )

PYPI_VERIFY_REPO="https://github.com/chrisguidry/uncalled-for"

inherit distutils-r1 pypi

DESCRIPTION="Async dependency injection for Python functions"
HOMEPAGE="https://github.com/chrisguidry/uncalled-for"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

python_prepare_all() {
	# Coverage options, including a 100% threshold.
	sed -e '/"--cov/d' -i pyproject.toml || die
	distutils-r1_python_prepare_all
}

EPYTEST_PLUGINS=( pytest-asyncio pytest-timeout )
distutils_enable_tests pytest