summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-03-02 05:25:28 +0100
committerMichał Górny <mgorny@gentoo.org>2023-03-02 05:29:36 +0100
commit1824d315ac02567c761572fe76be2b431cf6d4a6 (patch)
tree517e97d34ca24fe0e5248c04f060dad81752ecf1 /dev-python
parent120c93faa463d7cbe498fe6fd4b257ba77b7d9ef (diff)
downloadgentoo-1824d315ac02567c761572fe76be2b431cf6d4a6.tar.gz
gentoo-1824d315ac02567c761572fe76be2b431cf6d4a6.tar.bz2
gentoo-1824d315ac02567c761572fe76be2b431cf6d4a6.zip
dev-python/requests-cache: Bump to 1.0.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/requests-cache/Manifest1
-rw-r--r--dev-python/requests-cache/requests-cache-1.0.0.ebuild71
2 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/requests-cache/Manifest b/dev-python/requests-cache/Manifest
index 146f525a7f5f..c2b4ab0b6a2e 100644
--- a/dev-python/requests-cache/Manifest
+++ b/dev-python/requests-cache/Manifest
@@ -1 +1,2 @@
DIST requests-cache-0.9.8.gh.tar.gz 1540296 BLAKE2B 8b2ab1227b28c3822cd9111375c8759f5d7099f2724680a6560e4e14cd16558a1dcb8dd98d043fdf2f9a3861d76dd0d2c2f84df059338e9fa28c1257e74e87b9 SHA512 f428a7b498d2ef2b6c23d3715bac2274c320b6f9d6f56017e69ab5fa6b8830242a2f335ed6c3758a741a51f108c6dacae1a447ff8f05ca5686303caf48a1dc59
+DIST requests-cache-1.0.0.gh.tar.gz 2914633 BLAKE2B 5402d3b6bc99bb0b72a484854b83450d8f57fd0aff39661d6f2452c69cc0ca9b140fd2ac7b02110e47bcc0bf2497c58912330d7472b9f1701b8d4e2a54f7cef7 SHA512 92d6e1b9afb158f824a4b20d83c7b30a5988476b741213b0663df6095df1753da2dcd6516372ba383864e19d346850a356e9370b2ae27554effcc3f0b6a078c8
diff --git a/dev-python/requests-cache/requests-cache-1.0.0.ebuild b/dev-python/requests-cache/requests-cache-1.0.0.ebuild
new file mode 100644
index 000000000000..8e51d738f7ff
--- /dev/null
+++ b/dev-python/requests-cache/requests-cache-1.0.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 optfeature
+
+HOMEPAGE="
+ https://pypi.org/project/requests-cache/
+ https://github.com/requests-cache/requests-cache/
+"
+DESCRIPTION="Persistent cache for requests library"
+SRC_URI="
+ https://github.com/requests-cache/requests-cache/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ >=dev-python/cattrs-22.2[${PYTHON_USEDEP}]
+ >=dev-python/platformdirs-2.5[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+ dev-python/urllib3[${PYTHON_USEDEP}]
+ >=dev-python/url-normalize-1.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/itsdangerous[${PYTHON_USEDEP}]
+ dev-python/pytest-httpbin[${PYTHON_USEDEP}]
+ dev-python/requests-mock[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ dev-python/timeout-decorator[${PYTHON_USEDEP}]
+ >=dev-python/ujson-5.4[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # These require extra servers running
+ tests/integration/test_dynamodb.py
+ tests/integration/test_gridfs.py
+ tests/integration/test_mongodb.py
+ tests/integration/test_redis.py
+ )
+ local EPYTEST_DESELECT=(
+ # Requires Internet access
+ tests/integration/test_upgrade.py::test_version_upgrade
+ )
+
+ local -x USE_PYTEST_HTTPBIN=true
+ epytest
+}
+
+pkg_postinst() {
+ optfeature "redis backend" "dev-python/redis"
+ optfeature "MongoDB backend" "dev-python/pymongo"
+
+ optfeature "JSON serialization" "dev-python/ujson"
+ optfeature "YAML serialization" "dev-python/pyyaml"
+ optfeature "signing serialized data" "dev-python/itsdangerous"
+}