diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-10-20 10:26:20 +0200 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-10-21 15:40:24 +0200 |
commit | b770d1e7fd6156ad9ab8ba072d289a3954a91a54 (patch) | |
tree | cda83f84f5fd4f76ad0762cf969b087fb6405d19 | |
parent | dev-python/mako: Add python3.5 support (diff) | |
download | gentoo-b770d1e7fd6156ad9ab8ba072d289a3954a91a54.tar.gz gentoo-b770d1e7fd6156ad9ab8ba072d289a3954a91a54.tar.bz2 gentoo-b770d1e7fd6156ad9ab8ba072d289a3954a91a54.zip |
dev-python/bottle: Add python3.5 support
fix test deps
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec@gentoo.org>
-rw-r--r-- | dev-python/bottle/bottle-0.12.8.ebuild | 14 | ||||
-rw-r--r-- | dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch | 36 |
2 files changed, 46 insertions, 4 deletions
diff --git a/dev-python/bottle/bottle-0.12.8.ebuild b/dev-python/bottle/bottle-0.12.8.ebuild index d5917b600c69..bfa6f51c5426 100644 --- a/dev-python/bottle/bottle-0.12.8.ebuild +++ b/dev-python/bottle/bottle-0.12.8.ebuild @@ -4,8 +4,9 @@ EAPI=5 -PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 ) -inherit distutils-r1 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 ) + +inherit distutils-r1 eutils DESCRIPTION="A fast and simple micro-framework for small web-applications" HOMEPAGE="https://pypi.python.org/pypi/bottle http://bottlepy.org/" @@ -14,11 +15,15 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" -IUSE="" +IUSE="test" -DEPEND="" +DEPEND="test? ( dev-python/mako[$(python_gen_usedep 'python*')] )" RDEPEND="" +PATCHES=( + "${FILESDIR}"/${P}-py3.5-backport.patch +) + python_prepare_all() { sed -i -e '/scripts/d' setup.py || die @@ -34,6 +39,7 @@ python_test() { } pkg_postinst() { + optfeature "Templating support" dev-python/mako elog "Due to problems with bottle.py being in /usr/bin (see bug #474874)" elog "we do as most other distros and do not install the script anymore." elog "If you do want/have to call it directly rather than through your app," diff --git a/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch b/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch new file mode 100644 index 000000000000..86e1ac04bc41 --- /dev/null +++ b/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch @@ -0,0 +1,36 @@ + test/test_environ.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/test_environ.py b/test/test_environ.py +old mode 100755 +new mode 100644 +index 2b8079b..2feebe3 +--- a/test/test_environ.py ++++ b/test/test_environ.py +@@ -592,7 +592,7 @@ class TestResponse(unittest.TestCase): + r.set_cookie('name2', 'value', max_age=datetime.timedelta(days=1)) + cookies = sorted([value for name, value in r.headerlist + if name.title() == 'Set-Cookie']) +- self.assertEqual(cookies[0], 'name1=value; Max-Age=5') ++ self.assertEqual(cookies[0].lower(), 'name1=value; max-age=5') + self.assertEqual(cookies[1], 'name2=value; Max-Age=86400') + + def test_set_cookie_expires(self): +@@ -602,7 +602,7 @@ class TestResponse(unittest.TestCase): + r.set_cookie('name2', 'value', expires=datetime.datetime(1970,1,1,0,0,43)) + cookies = sorted([value for name, value in r.headerlist + if name.title() == 'Set-Cookie']) +- self.assertEqual(cookies[0], 'name1=value; expires=Thu, 01 Jan 1970 00:00:42 GMT') ++ self.assertEqual(cookies[0].lower(), 'name1=value; expires=thu, 01 jan 1970 00:00:42 gmt') + self.assertEqual(cookies[1], 'name2=value; expires=Thu, 01 Jan 1970 00:00:43 GMT') + + def test_delete_cookie(self): +@@ -611,7 +611,7 @@ class TestResponse(unittest.TestCase): + response.delete_cookie('name') + cookies = [value for name, value in response.headerlist + if name.title() == 'Set-Cookie'] +- self.assertTrue('name=;' in cookies[0]) ++ self.assertTrue('Max-Age=-1' in cookies[0]) + + def test_set_header(self): + response = BaseResponse() |