summaryrefslogtreecommitdiff
path: root/dev-python/hishel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-24 23:59:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-24 23:59:27 +0100
commitb987a550f067c3da93b0664cf1fdc8a624c0aa38 (patch)
tree9ad1767fad656d26471a81af6bac8400a1c75218 /dev-python/hishel
parente3f21c8aff8a76afe3423721c437a088e9232840 (diff)
gentoo auto-resync : 24:04:2024 - 23:59:27
Diffstat (limited to 'dev-python/hishel')
-rw-r--r--dev-python/hishel/Manifest2
-rw-r--r--dev-python/hishel/hishel-0.0.26.ebuild73
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/hishel/Manifest b/dev-python/hishel/Manifest
index ecbe4d64d634..0caca5e212c3 100644
--- a/dev-python/hishel/Manifest
+++ b/dev-python/hishel/Manifest
@@ -1,3 +1,5 @@
DIST hishel-0.0.25.gh.tar.gz 825114 BLAKE2B dd7d7bec47700a1ab07976ba31b951adacf7e917dd7ba09419cc6e3b81f1b6609a1f7f14a6c176b0c151ed255cf099f3da60122717b2be9161bd41b7ba080f36 SHA512 16aec1ea495075b4932e1e9d16b07af060b49bb74faed097343bde99c5d2b656b36762b2f2d67fd46c31b700206eec77ecdfb364a1c2cd19bb67c3055abc9e98
+DIST hishel-0.0.26.gh.tar.gz 828246 BLAKE2B e8273020c3b69edc0a080940d8462d33c4eb6b6bbb6f0325975ef29e15d0f16c57a31406f24ae56ad651722ccf6ff704afcedb917417355f67b7536d80dc0c3f SHA512 1d5d55e2ad2743ac15b258c1246a21975c4e8bf5786e331d55acc6e5cb82c0393b23b7c00a5ea9f6f8070e5e3cf6d5f6d9755315403748259d99e6ce20ccd27f
EBUILD hishel-0.0.25-r1.ebuild 1720 BLAKE2B 418142e364c802db5ef8348cc39017f45aff35e8acbac2a1b57c96ee2d873d740fbdfcd539b78e0b9e0eaa04100fda30331adec46befa8e88b6788b8a3a09c0b SHA512 8fb39d0f967504c1443417dd7f3ac55627fee958fb54e26bc8b8d7718c107721a71dc5ffd7f4c354e6a8404ed188943c488a397d5985b51fc4e2391a406fa10d
+EBUILD hishel-0.0.26.ebuild 1629 BLAKE2B ed9681c33bb7e63816a4cbbbd5fb51151a0a6ab4c78f8dcd33da3625827505408422e701fd3966c75d98cd074aa693abb14cbf9493c242c0087d78f16e7ac08d SHA512 9491e5c4a1de8f1c69e335484058bdabd3a17f56835f293ea9931a5c1cc340f676b905a2b6d671423d760023606471ad0b77e7959d4d379679fa9ce74febb0d8
MISC metadata.xml 378 BLAKE2B 24bb3b6d47931488021a625ac5f4eca9575efaebabc4af29fcd42ea8468a0a8da077d88b98c6f348c7528d7b338fbf553475894fe0726f11ca48c6c5d4720f61 SHA512 ae67451815773cffe43a0e16ae42020f1c29fb83ad711633666b065be586a08e4da5ebcee8e35d7f0c0084c018713760a1f20b4b9a7f2a5d43691589be357b42
diff --git a/dev-python/hishel/hishel-0.0.26.ebuild b/dev-python/hishel/hishel-0.0.26.ebuild
new file mode 100644
index 000000000000..479c64d5d556
--- /dev/null
+++ b/dev-python/hishel/hishel-0.0.26.ebuild
@@ -0,0 +1,73 @@
+# 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..12} )
+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/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/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
+}