summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-09-28 09:24:18 +0200
committerMichał Górny <mgorny@gentoo.org>2024-09-28 09:42:28 +0200
commit86a5f58e00bae8acbe695f1c90b3d870880a78d2 (patch)
tree3d98e92a3382cc3aae395177e198eceba9fc6e4d /dev-python/hishel
parentdev-python/hishel: Remove old (diff)
downloadgentoo-86a5f58e00bae8acbe695f1c90b3d870880a78d2.tar.gz
gentoo-86a5f58e00bae8acbe695f1c90b3d870880a78d2.tar.bz2
gentoo-86a5f58e00bae8acbe695f1c90b3d870880a78d2.zip
dev-python/hishel: Bump to 0.0.32
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/hishel')
-rw-r--r--dev-python/hishel/Manifest1
-rw-r--r--dev-python/hishel/hishel-0.0.32.ebuild74
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/hishel/Manifest b/dev-python/hishel/Manifest
index 23594c32588a..e51745497fe1 100644
--- a/dev-python/hishel/Manifest
+++ b/dev-python/hishel/Manifest
@@ -1 +1,2 @@
DIST hishel-0.0.31.gh.tar.gz 833160 BLAKE2B 417cd61a88ca2dd29661f00bf7ce743b38a3d50f4eb111c69a42f6c59fdb8e9774f00e1802fb87cc8156975ffb3fabddc17cdc8f217cc62fce161ce780bea315 SHA512 88a459f4898af0d10718e7a90ec4502bb323f41a26c03ea36bf03ea0e88fe0984778094fafe9c4f8fea21a6e051a4c424a137faa239812d407c3468d231c12ab
+DIST hishel-0.0.32.gh.tar.gz 833271 BLAKE2B 3c75271b2fc304f09737d25f60783a5a5a5d72200851273ceb4afefa7cf67ce96337f7ed05f83ccbaa3241ed1745bc0a60a9351877229638e266920f3afc4c0a SHA512 a7f66057793835d2c46068308b1835fc11729a8c84d906cc720f2c4a7644e87349a7260cff84c4a400f4e6fdd0b9ded92ccc9805aac21676c0e7dbc3191682fa
diff --git a/dev-python/hishel/hishel-0.0.32.ebuild b/dev-python/hishel/hishel-0.0.32.ebuild
new file mode 100644
index 000000000000..046e93ae7033
--- /dev/null
+++ b/dev-python/hishel/hishel-0.0.32.ebuild
@@ -0,0 +1,74 @@
+# Copyright 2024 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[${PYTHON_USEDEP}]
+ dev-python/typing-extensions[${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
+}