1 |
commit: e737bb29589b8d2fed3d1aa45e52c3f370dcabad |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 17 15:57:10 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 17 16:28:14 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e737bb29 |
7 |
|
8 |
dev-python/curtsies: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
dev-python/curtsies/Manifest | 1 + |
14 |
dev-python/curtsies/curtsies-0.2.4.ebuild | 38 ++++++ |
15 |
.../files/curtsies-0.2.4-test-backport.patch | 132 +++++++++++++++++++++ |
16 |
3 files changed, 171 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/curtsies/Manifest b/dev-python/curtsies/Manifest |
19 |
index 84852f4..73579ac 100644 |
20 |
--- a/dev-python/curtsies/Manifest |
21 |
+++ b/dev-python/curtsies/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST curtsies-0.1.18.tar.gz 44353 SHA256 477121f256eea2b71237492e2924f05b54e1f91815d042bf91d7112b71d4edd4 SHA512 02ae86b215dca10e779061485cb18ab8b6fefbdad10e2bcad3c24890b79f81d1aae0b84467a23ca1951ffaa336fc2fe9b5137c1a10a65fafe0a0b540cc0c819c WHIRLPOOL 801738c450c2fd9343e01260240ebd5ed74e951c03a918808c8c2c47e8ec46afe425f4d8978dea894d2cdf36bc2e3bd19e9de2ed12a62e5786eebeed87dd9800 |
24 |
DIST curtsies-0.2.3.tar.gz 42805 SHA256 5da88a67472ada96de3be2a9da4210080c7e4b2c1afc4c97075b3f51755e0dc4 SHA512 8d48fb147fc247b2241472543a5019a55ef1b8f029b0bb93c7de72cd9eeb1bfe9940520bb5a0509406915523b98e1dbd9f07499e9eb9649d6d70df51ba71606d WHIRLPOOL 6b3e37f630488f01b6451349fcbf5e81cde7cdf8e1590bc4c65bb9bdffb4b83f8d868c37624e3f1f932cc51d9af251914f8fa55bc88eeaacc6c2dd3eb91239ea |
25 |
+DIST curtsies-0.2.4.tar.gz 43313 SHA256 ae52dbb1c828369b85ed3650c846bd7bf4832916dc472220d3365c3e46e1dce6 SHA512 85ec1e87720cde03be012bb0dcb300acaac5d9a3cc3c8bd6b0e7a8d4e048abbb6ef24513ea2b8f3d106b92ac2db752c2054e699bc1ef7131f8f18e20c541fc3e WHIRLPOOL b236c072b0907115da835827078ba9363bbb199c2202bbbf7f6cabc86c47da5d1505aeaaa2fb0de1924651add2f08c0a65d8c17a9d79096b6a7d8094402d7d53 |
26 |
|
27 |
diff --git a/dev-python/curtsies/curtsies-0.2.4.ebuild b/dev-python/curtsies/curtsies-0.2.4.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..36241d3 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/curtsies/curtsies-0.2.4.ebuild |
32 |
@@ -0,0 +1,38 @@ |
33 |
+# Copyright 1999-2015 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=5 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python2_7 python3_{3,4} ) |
40 |
+ |
41 |
+inherit distutils-r1 |
42 |
+ |
43 |
+DESCRIPTION="Curses-like terminal wrapper, with colored strings" |
44 |
+HOMEPAGE="https://github.com/thomasballinger/curtsies" |
45 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
46 |
+ |
47 |
+SLOT="0" |
48 |
+LICENSE="MIT" |
49 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
50 |
+IUSE="test" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ >=dev-python/blessings-1.5[${PYTHON_USEDEP}] |
54 |
+ dev-python/pyte[${PYTHON_USEDEP}] |
55 |
+ >=dev-python/wcwidth-0.1.4[${PYTHON_USEDEP}] |
56 |
+" |
57 |
+DEPEND="${RDEPEND} |
58 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
59 |
+ test? ( |
60 |
+ dev-python/mock[${PYTHON_USEDEP}] |
61 |
+ dev-python/nose[${PYTHON_USEDEP}] |
62 |
+ dev-python/pyte[${PYTHON_USEDEP}] |
63 |
+ ) |
64 |
+" |
65 |
+ |
66 |
+PATCHES=( "${FILESDIR}"/${P}-test-backport.patch ) |
67 |
+ |
68 |
+python_test() { |
69 |
+ nosetests --verbose tests || die |
70 |
+} |
71 |
|
72 |
diff --git a/dev-python/curtsies/files/curtsies-0.2.4-test-backport.patch b/dev-python/curtsies/files/curtsies-0.2.4-test-backport.patch |
73 |
new file mode 100644 |
74 |
index 0000000..8fd53d7 |
75 |
--- /dev/null |
76 |
+++ b/dev-python/curtsies/files/curtsies-0.2.4-test-backport.patch |
77 |
@@ -0,0 +1,132 @@ |
78 |
+From 5384f455631a973661af84bbe823b9d59af4d5b1 Mon Sep 17 00:00:00 2001 |
79 |
+From: Thomas Ballinger <thomasballinger@×××××.com> |
80 |
+Date: Sun, 6 Dec 2015 14:09:37 -0500 |
81 |
+Subject: [PATCH] skip tests when blessings Terminal can't be made |
82 |
+ |
83 |
+--- |
84 |
+ tests/test_input.py | 13 ++++++++++++- |
85 |
+ tests/test_terminal.py | 16 ++++++++++++++++ |
86 |
+ tests/test_window.py | 14 ++++++++++++++ |
87 |
+ 3 files changed, 42 insertions(+), 1 deletion(-) |
88 |
+ |
89 |
+diff --git a/tests/test_input.py b/tests/test_input.py |
90 |
+index 13cb25a..31a7d23 100644 |
91 |
+--- a/tests/test_input.py |
92 |
++++ b/tests/test_input.py |
93 |
+@@ -1,20 +1,30 @@ |
94 |
+ import os |
95 |
+ import signal |
96 |
++import sys |
97 |
+ import threading |
98 |
+ import time |
99 |
+ import unittest |
100 |
+ from mock import Mock |
101 |
+ |
102 |
+ try: |
103 |
+- from unittest import skip |
104 |
++ from unittest import skip, skipIf |
105 |
+ except ImportError: |
106 |
++ |
107 |
+ def skip(f): |
108 |
+ return lambda self: None |
109 |
+ |
110 |
++ def skipIf(condition, reason): |
111 |
++ if condition: |
112 |
++ return lambda x: x |
113 |
++ else: |
114 |
++ return lambda x: None |
115 |
++ |
116 |
+ from curtsies import events |
117 |
+ |
118 |
+ from curtsies.input import Input |
119 |
+ |
120 |
++fds_closed = sys.stdin.closed or sys.stdout.closed |
121 |
++ |
122 |
+ |
123 |
+ class CustomEvent(events.Event): |
124 |
+ pass |
125 |
+@@ -24,6 +34,7 @@ class CustomScheduledEvent(events.ScheduledEvent): |
126 |
+ pass |
127 |
+ |
128 |
+ |
129 |
++@skipIf(fds_closed, "need open file descriptors to test") |
130 |
+ class TestInput(unittest.TestCase): |
131 |
+ def test_create(self): |
132 |
+ Input() |
133 |
+diff --git a/tests/test_terminal.py b/tests/test_terminal.py |
134 |
+index 0df11b0..58f40e3 100644 |
135 |
+--- a/tests/test_terminal.py |
136 |
++++ b/tests/test_terminal.py |
137 |
+@@ -17,6 +17,19 @@ |
138 |
+ from curtsies.window import BaseWindow, FullscreenWindow, CursorAwareWindow |
139 |
+ |
140 |
+ |
141 |
++try: |
142 |
++ from unittest import skipIf |
143 |
++except ImportError: |
144 |
++ def skipIf(condition, reason): |
145 |
++ if condition: |
146 |
++ return lambda x: x |
147 |
++ else: |
148 |
++ return lambda x: None |
149 |
++ |
150 |
++ |
151 |
++fds_closed = sys.stdin.closed or sys.stdout.closed |
152 |
++ |
153 |
++ |
154 |
+ class FakeStdin(StringIO): |
155 |
+ encoding = 'ascii' |
156 |
+ |
157 |
+@@ -85,6 +98,7 @@ def write(self, s): |
158 |
+ def flush(self): pass |
159 |
+ |
160 |
+ |
161 |
++@skipIf(fds_closed, 'blessings Terminal needs streams open') |
162 |
+ class TestFullscreenWindow(unittest.TestCase): |
163 |
+ def setUp(self): |
164 |
+ self.screen = pyte.Screen(10, 3) |
165 |
+@@ -110,6 +124,7 @@ def __enter__(*args): pass |
166 |
+ def __exit__(*args): pass |
167 |
+ |
168 |
+ |
169 |
++@skipIf(fds_closed, 'blessings Terminal needs streams open') |
170 |
+ class TestCursorAwareWindow(unittest.TestCase): |
171 |
+ def setUp(self): |
172 |
+ self.screen = ReportingScreen(6, 3) |
173 |
+@@ -142,6 +157,7 @@ def test_inital_cursor_position(self): |
174 |
+ self.assertEqual(self.screen.display, [u' ', u'hi ', u'there ']) |
175 |
+ |
176 |
+ |
177 |
++@skipIf(fds_closed, 'blessings Terminal needs streams open') |
178 |
+ class TestCursorAwareWindowWithExtraInput(unittest.TestCase): |
179 |
+ def setUp(self): |
180 |
+ self.screen = ReportingScreenWithExtra(6, 3) |
181 |
+diff --git a/tests/test_window.py b/tests/test_window.py |
182 |
+index 1f4485c..89a3480 100644 |
183 |
+--- a/tests/test_window.py |
184 |
++++ b/tests/test_window.py |
185 |
+@@ -9,10 +9,24 @@ |
186 |
+ else: |
187 |
+ from cStringIO import StringIO |
188 |
+ |
189 |
++try: |
190 |
++ from unittest import skipIf |
191 |
++except ImportError: |
192 |
++ def skipIf(condition, reason): |
193 |
++ if condition: |
194 |
++ return lambda x: x |
195 |
++ else: |
196 |
++ return lambda x: None |
197 |
++ |
198 |
++ |
199 |
++fds_closed = sys.stdin.closed or sys.stdout.closed |
200 |
++ |
201 |
++ |
202 |
+ class FakeFullscreenWindow(FullscreenWindow): |
203 |
+ width = property(lambda self: 10) |
204 |
+ height = property(lambda self: 4) |
205 |
+ |
206 |
++@skipIf(fds_closed, "blessings Terminal needs streams open") |
207 |
+ class TestBaseWindow(unittest.TestCase): |
208 |
+ """Pretty pathetic tests for window""" |
209 |
+ def test_window(self): |