diff --git a/dev-python/hishel/Manifest b/dev-python/hishel/Manifest index f893aafded24f..d2290094b264b 100644 --- a/dev-python/hishel/Manifest +++ b/dev-python/hishel/Manifest @@ -1 +1,2 @@ DIST hishel-0.1.3.gh.tar.gz 877174 BLAKE2B 296337921b1b7091b3fd8c4ec45203c7dc6138659d4affcd26a84cedf408cd39c835bf24acee5766deb59c4589d81fb4a9b7fc2f38ae5e328175f2a886617502 SHA512 5807cb1ddd819e3903f038b330cde7abb12101a46782c5117cc97b4cd53e752d8ed0e69ac9d0142fe1314b2ce56f1173aac23989f96e78596bbc3b6696a4f713 +DIST hishel-0.1.4.gh.tar.gz 1079026 BLAKE2B c058ddeb0fd8552cf6f2cba5d74a8d259f3008caf0ab259ca98d897c98fa92d3a1a31de2b292217178b1743393da04056e304997546d7a14395bab5b23f36f2e SHA512 213f9a51e3ed079c7558449cd90691988ad7defddaf7eb0b94a70bebe26f1a9f3d63119666124e7fd414b593a77041deb14b8bee13e4ece87fc36b30d2cf0b1e diff --git a/dev-python/hishel/hishel-0.1.4.ebuild b/dev-python/hishel/hishel-0.1.4.ebuild new file mode 100644 index 0000000000000..1543cf5bce223 --- /dev/null +++ b/dev-python/hishel/hishel-0.1.4.ebuild @@ -0,0 +1,73 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +DESCRIPTION="An elegant HTTP Cache implementation for HTTPX and HTTP Core" +HOMEPAGE=" + https://github.com/karpetrosyan/hishel + https://pypi.org/project/hishel/ +" +SRC_URI=" + https://github.com/karpetrosyan/${PN}/archive/refs/tags/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/anyio-4.9.0[${PYTHON_USEDEP}] + >=dev-python/anysqlite-0.0.5[${PYTHON_USEDEP}] + >=dev-python/httpx-0.28[${PYTHON_USEDEP}] + >=dev-python/msgpack-1.1.2[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-1.14.1[${PYTHON_USEDEP}] +" + +BDEPEND=" + ${RDEPEND} + dev-python/hatch-fancy-pypi-readme[${PYTHON_USEDEP}] + test? ( + dev-db/redis + >=dev-python/boto3-1.15.3[${PYTHON_USEDEP}] + >=dev-python/inline-snapshot-0.28.0[${PYTHON_USEDEP}] + >=dev-python/redis-6.2.0[${PYTHON_USEDEP}] + >=dev-python/time-machine-2.19.0[${PYTHON_USEDEP}] + >=dev-python/trio-0.30.0[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=( anyio ) +distutils_enable_tests pytest + +src_test() { + local EPYTEST_DESELECT=( + # Internet + tests/beta/test_async_httpx.py + tests/beta/test_requests.py + tests/beta/test_sync_httpx.py + ) + + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + einfo "Starting Redis" + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF + daemonize yes + pidfile ${redis_pid} + port ${redis_port} + bind 127.0.0.1 ::1 + EOF + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${redis_pid}")" || die +}