* [gentoo-commits] dev/dev-zero:master commit in: dev-python/flask-caching/, dev-python/flask-caching/files/
@ 2016-08-22 15:07 Tiziano Müller
0 siblings, 0 replies; only message in thread
From: Tiziano Müller @ 2016-08-22 15:07 UTC (permalink / raw
To: gentoo-commits
commit: 6ee8fc8a081017567af281bde4c5ac82d5cf30ca
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 22 15:07:30 2016 +0000
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 15:07:30 2016 +0000
URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=6ee8fc8a
dev-python/flask-caching: initial commit
dev-python/flask-caching/Manifest | 1 +
...ching-1.0.0-disable-redis-memcached-tests.patch | 70 ++++++++++++++++++++++
.../flask-caching/flask-caching-1.0.0.ebuild | 33 ++++++++++
3 files changed, 104 insertions(+)
diff --git a/dev-python/flask-caching/Manifest b/dev-python/flask-caching/Manifest
new file mode 100644
index 0000000..3023764
--- /dev/null
+++ b/dev-python/flask-caching/Manifest
@@ -0,0 +1 @@
+DIST Flask-Caching-1.0.0.tar.gz 48496 SHA256 9894b14e9c6f487b3ca7aeacbc5887392f10f11b0e1de9c1f8133b003780c396 SHA512 3df43452de867fa3c7e482cb14f278b1e451bdac2226b2988a5cde6d78ca8ca113cc841284ae4a39f1e771e3d667df9117802aae3e66d84e497e5057a770bf57 WHIRLPOOL 65d61492115e556764cf31c2fa18171cb13d277cca752445df3b846fb2e8e0793abca23ce02395408233d81204216410303e62d7a0ef3310e871b9133006a412
diff --git a/dev-python/flask-caching/files/flask-caching-1.0.0-disable-redis-memcached-tests.patch b/dev-python/flask-caching/files/flask-caching-1.0.0-disable-redis-memcached-tests.patch
new file mode 100644
index 0000000..e6a5dae
--- /dev/null
+++ b/dev-python/flask-caching/files/flask-caching-1.0.0-disable-redis-memcached-tests.patch
@@ -0,0 +1,70 @@
+diff --git a/test_cache.py b/test_cache.py
+index 22666a6..c76d66f 100644
+--- a/test_cache.py
++++ b/test_cache.py
+@@ -746,65 +746,6 @@ class CacheTestCase(unittest.TestCase):
+ # print view_pie.cake_cache_key
+ assert view_cake.cake_cache_key == view_pie.cake_cache_key
+
+-try:
+- import redis
+- HAS_REDIS = True
+-except ImportError:
+- HAS_REDIS = False
+-
+-if sys.version_info <= (2, 7):
+- class CacheMemcachedTestCase(CacheTestCase):
+- def _set_app_config(self, app):
+- app.config['CACHE_TYPE'] = 'memcached'
+-
+- class SpreadCacheMemcachedTestCase(CacheTestCase):
+- def _set_app_config(self, app):
+- app.config['CACHE_TYPE'] = 'spreadsaslmemcachedcache'
+-
+-
+-class CacheRedisTestCase(CacheTestCase):
+- def _set_app_config(self, app):
+- app.config['CACHE_TYPE'] = 'redis'
+-
+- @unittest.skipUnless(HAS_REDIS, "requires Redis")
+- def test_20_redis_url_default_db(self):
+- config = {
+- 'CACHE_TYPE': 'redis',
+- 'CACHE_REDIS_URL': 'redis://localhost:6379',
+- }
+- cache = Cache()
+- cache.init_app(self.app, config=config)
+- from werkzeug.contrib.cache import RedisCache
+- assert isinstance(self.app.extensions['cache'][cache], RedisCache)
+- rconn = self.app.extensions['cache'][cache] \
+- ._client.connection_pool.get_connection('foo')
+- assert rconn.db == 0
+-
+- @unittest.skipUnless(HAS_REDIS, "requires Redis")
+- def test_21_redis_url_custom_db(self):
+- config = {
+- 'CACHE_TYPE': 'redis',
+- 'CACHE_REDIS_URL': 'redis://localhost:6379/2',
+- }
+- cache = Cache()
+- cache.init_app(self.app, config=config)
+- rconn = self.app.extensions['cache'][cache] \
+- ._client.connection_pool.get_connection('foo')
+- assert rconn.db == 2
+-
+- @unittest.skipUnless(HAS_REDIS, "requires Redis")
+- def test_22_redis_url_explicit_db_arg(self):
+- config = {
+- 'CACHE_TYPE': 'redis',
+- 'CACHE_REDIS_URL': 'redis://localhost:6379',
+- 'CACHE_REDIS_DB': 1,
+- }
+- cache = Cache()
+- cache.init_app(self.app, config=config)
+- rconn = self.app.extensions['cache'][cache] \
+- ._client.connection_pool.get_connection('foo')
+- assert rconn.db == 1
+-
+
+ class CacheFilesystemTestCase(CacheTestCase):
+ def _set_app_config(self, app):
diff --git a/dev-python/flask-caching/flask-caching-1.0.0.ebuild b/dev-python/flask-caching/flask-caching-1.0.0.ebuild
new file mode 100644
index 0000000..1896adf
--- /dev/null
+++ b/dev-python/flask-caching/flask-caching-1.0.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1
+
+MY_PN="Flask-Caching"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Adds caching support to your Flask application"
+HOMEPAGE="https://pypi.python.org/pypi/Flask-Caching https://github.com/sh4nks/flask-caching"
+SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/flask[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ "
+
+PATCHES=( "${FILESDIR}/${P}-disable-redis-memcached-tests.patch" )
+
+S="${WORKDIR}/${MY_P}"
+
+python_test() {
+ esetup.py test
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-22 15:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-22 15:07 [gentoo-commits] dev/dev-zero:master commit in: dev-python/flask-caching/, dev-python/flask-caching/files/ Tiziano Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox