From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4AE5313832E for ; Mon, 22 Aug 2016 15:07:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3FB1621C028; Mon, 22 Aug 2016 15:07:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C81AF21C028 for ; Mon, 22 Aug 2016 15:07:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 40C1E340688 for ; Mon, 22 Aug 2016 15:07:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 80F7A2444 for ; Mon, 22 Aug 2016 15:07:40 +0000 (UTC) From: "Tiziano Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tiziano Müller" Message-ID: <1471878450.6ee8fc8a081017567af281bde4c5ac82d5cf30ca.dev-zero@gentoo> Subject: [gentoo-commits] dev/dev-zero:master commit in: dev-python/flask-caching/, dev-python/flask-caching/files/ X-VCS-Repository: dev/dev-zero X-VCS-Files: dev-python/flask-caching/Manifest dev-python/flask-caching/files/flask-caching-1.0.0-disable-redis-memcached-tests.patch dev-python/flask-caching/flask-caching-1.0.0.ebuild X-VCS-Directories: dev-python/flask-caching/ dev-python/flask-caching/files/ X-VCS-Committer: dev-zero X-VCS-Committer-Name: Tiziano Müller X-VCS-Revision: 6ee8fc8a081017567af281bde4c5ac82d5cf30ca X-VCS-Branch: master Date: Mon, 22 Aug 2016 15:07:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5584e10e-fa38-470d-910f-5ec1d055e16f X-Archives-Hash: 469f0813dccb411acf5049d50375125a commit: 6ee8fc8a081017567af281bde4c5ac82d5cf30ca Author: Tiziano Müller gentoo org> AuthorDate: Mon Aug 22 15:07:30 2016 +0000 Commit: Tiziano Müller gentoo 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 +}