summaryrefslogtreecommitdiff
path: root/dev-python/requests-cache
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-04-10 13:45:26 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-04-10 13:45:26 +0000
commitf4ec62be67ca7c839ef6cdbc7b4de72196545f03 (patch)
tree4fb56e62ab708c292e710febe7cbda4f2a41e67b /dev-python/requests-cache
parentf5b63febc661ea97ecc7948da6169d59e628efb5 (diff)
downloadbaldeagleos-repo-f4ec62be67ca7c839ef6cdbc7b4de72196545f03.tar.gz
baldeagleos-repo-f4ec62be67ca7c839ef6cdbc7b4de72196545f03.tar.xz
baldeagleos-repo-f4ec62be67ca7c839ef6cdbc7b4de72196545f03.zip
Adding metadata
Diffstat (limited to 'dev-python/requests-cache')
-rw-r--r--dev-python/requests-cache/Manifest1
-rw-r--r--dev-python/requests-cache/files/requests-cache-0.6.0-test-install.patch25
-rw-r--r--dev-python/requests-cache/requests-cache-0.6.0.ebuild69
3 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/requests-cache/Manifest b/dev-python/requests-cache/Manifest
index 8f1ffcb456ee..858021548fd4 100644
--- a/dev-python/requests-cache/Manifest
+++ b/dev-python/requests-cache/Manifest
@@ -1 +1,2 @@
DIST requests-cache-0.5.2.tar.gz 31159 BLAKE2B 4fca146a751064baf70954a71df64dbb7f8c9a4e27fec5dbea3620496ce78e7ccfb3785fb63705f513ff6fa938376b0c6acc4a2f584856060b1bc8388517df46 SHA512 355cc571a46b768615606a907a69ed065b3c4b5e74bb6c311abc7a28d9406f32fdea1db0dfd2b1c32dcdc82ed817ef7e0b30086c069de57307254617604c5177
+DIST requests-cache-0.6.0.tar.gz 52342 BLAKE2B 12af89721fcf1ae2e4ab14d7ac377f119ef312c64d3b9e5d80a36f26f3a9a798cf090835ee2c9bf886d0baa9b472f4c439d5a032573d442feecbbad930c239fd SHA512 b5b32b9cb99ec51cee67defde715df66b7c50a26f4124cbaf893685048fe188af0cf664232150e3b4fafe3b7a927716966efafadd711be01118d67ad802acef6
diff --git a/dev-python/requests-cache/files/requests-cache-0.6.0-test-install.patch b/dev-python/requests-cache/files/requests-cache-0.6.0-test-install.patch
new file mode 100644
index 000000000000..3862716c3016
--- /dev/null
+++ b/dev-python/requests-cache/files/requests-cache-0.6.0-test-install.patch
@@ -0,0 +1,25 @@
+From 430424bf43ad1f5979adbb2eabdbb23726465fde Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 10 Apr 2021 10:56:39 +0200
+Subject: [PATCH] Do not install "tests" package
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 5ca5b80..58d8e89 100644
+--- a/setup.py
++++ b/setup.py
+@@ -40,7 +40,7 @@ extras_require['dev'] = list(chain.from_iterable(extras_require.values()))
+
+ setup(
+ name='requests-cache',
+- packages=find_packages(),
++ packages=find_packages(exclude=['tests*']),
+ version=__version__,
+ author='Roman Haritonov',
+ author_email='reclosedev@gmail.com',
+--
+2.31.1
+
diff --git a/dev-python/requests-cache/requests-cache-0.6.0.ebuild b/dev-python/requests-cache/requests-cache-0.6.0.ebuild
new file mode 100644
index 000000000000..bb3609d589ba
--- /dev/null
+++ b/dev-python/requests-cache/requests-cache-0.6.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9,10} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+HOMEPAGE="https://pypi.org/project/requests-cache/"
+DESCRIPTION="Persistent cache for requests library"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/itsdangerous[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/url-normalize-1.4[${PYTHON_USEDEP}]"
+BDEPEND="
+ test? (
+ $(python_gen_any_dep '
+ dev-python/httpbin[${PYTHON_USEDEP}]
+ www-servers/gunicorn[${PYTHON_USEDEP}]
+ ')
+ )"
+
+distutils_enable_sphinx docs
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-install.patch
+)
+
+python_check_deps() {
+ use test || return 0
+
+ has_version -b "dev-python/httpbin[${PYTHON_USEDEP}]" &&
+ has_version -b "www-servers/gunicorn[${PYTHON_USEDEP}]"
+}
+
+src_test() {
+ local hostport="127.0.0.1:23125"
+ python_setup
+ einfo "Starting httpbin on ${hostport}"
+ gunicorn -b "${hostport}" -D -p gunicorn.pid httpbin:app || die
+
+ local -x HTTPBIN_URL="http://${hostport}/"
+ distutils-r1_src_test
+ kill $(<gunicorn.pid) || die
+}
+
+python_test() {
+ local skipped_tests=(
+ # 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
+
+ # TODO
+ 'tests/integration/test_cache.py::test_all_response_formats[json]'
+ )
+
+ epytest ${skipped_tests[@]/#/--deselect }
+}