# 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/mosquito/aiofile"

inherit distutils-r1 pypi

DESCRIPTION="Asynchronous file operations."
HOMEPAGE="https://github.com/mosquito/aiofile"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

# Upstream pins caio~=0.9.0, but 0.9.x no longer compiles (it assigns a pointer
# to iocb.aio_data, which -Wint-conversion rejects) and 0.10 works unchanged.
RDEPEND=">=dev-python/caio-0.9.0[${PYTHON_USEDEP}]
	<dev-python/caio-0.11.0[${PYTHON_USEDEP}]"
BDEPEND="test? (
	dev-python/aiomisc-pytest[${PYTHON_USEDEP}]
	dev-python/markdown-pytest[${PYTHON_USEDEP}]
)"

EPYTEST_PLUGINS=()
distutils_enable_tests pytest