commit: fd744f3dfe2ef9b99894179152c470c585d02e3f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 5 05:45:52 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr 5 06:37:40 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd744f3d
dev-python/hishel: Bump to 0.1.2
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/hishel/Manifest | 1 +
dev-python/hishel/hishel-0.1.2.ebuild | 77 +++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
diff --git a/dev-python/hishel/Manifest b/dev-python/hishel/Manifest
index 48bd2479354e..b787cef1a7a3 100644
--- a/dev-python/hishel/Manifest
+++ b/dev-python/hishel/Manifest
@@ -1,2 +1,3 @@
DIST hishel-0.0.33.gh.tar.gz 836608 BLAKE2B
f2db821b66ab0387756c503f2c844704bfbce7d98399b2454ed1b0f5e65ed946e9d857412ac7f9bbb5532e8cc8546fe7e8480f29d87e61d287690a82879d5773
SHA512
c69261b0f3af45c57f9d95114bfe03c64c7f6490429f9c00dbad41935da16a3125c08d4aaf613686a29c54b5a13b1884dd0c298b718158b25ee28422f3c236be
DIST hishel-0.1.1.gh.tar.gz 877049 BLAKE2B
6ab40873065490a86810fca1f0c868cdf792f0dcaef9eaed245a08c53ac5cfb8de70278577f05703024f4dd333ab4c6b3566002a6c4f428488c10e39899ec52e
SHA512
f4fdb17cd444318e8e3fab264e611fb18fae82030ab77bd09783aeb7756fe7a5aa8ac288a442ee737257f9db0ce8218aadaf4eca845e999d13928e46b7ddc44a
+DIST hishel-0.1.2.gh.tar.gz 876933 BLAKE2B
e301071b563071b0b3f33d7ab9913dd363732f6cd9a5e93f33ca3ea7cf86d14fb400ee10627dd9448df3ba3879c3dd0c490b3d435d2012d5176b42b3d6cdf92a
SHA512
11b5eed0d5bbae099306c7274c50d677ce831f42f35b17beb09ae5f71abb947969ebb8a7dd1e983ac6a067e6ca0e59648a7c8bb52eb7b0b61dc20573c940a7c2
diff --git a/dev-python/hishel/hishel-0.1.2.ebuild
b/dev-python/hishel/hishel-0.1.2.ebuild
new file mode 100644
index 000000000000..3ed166eb2c90
--- /dev/null
+++ b/dev-python/hishel/hishel-0.1.2.ebuild
@@ -0,0 +1,77 @@
+# 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_{10..13} )
+
+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 ~arm64"
+
+RDEPEND="
+ >=dev-python/httpx-0.28[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+ ${RDEPEND}
+ dev-python/hatch-fancy-pypi-readme[${PYTHON_USEDEP}]
+ test? (
+ dev-db/redis
+ dev-python/anyio[${PYTHON_USEDEP}]
+ dev-python/boto3[${PYTHON_USEDEP}]
+ dev-python/moto[${PYTHON_USEDEP}]
+ dev-python/redis[${PYTHON_USEDEP}]
+ dev-python/trio[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -e 's:mock_s3:mock_aws:g' \
+ -e '/import anysqlite/ d' \
+ -i tests/_async/test_storages.py \
+ tests/_sync/test_storages.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+src_test() {
+ local EPYTEST_DESELECT=(
+ # tests that need anysqlite
+ tests/_async/test_storages.py::test_sqlitestorage
+ tests/_async/test_storages.py::test_sqlite_expired
+ tests/_async/test_storages.py::test_sqlite_ttl_after_hits
+ )
+
+ 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
+}