Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/manuel/files/, dev-python/manuel/
Date: Sun, 20 Sep 2015 09:33:54
Message-Id: 1442741623.2d26b7f3ec173ee642b94bc593a656ecb2332f69.jlec@gentoo
1 commit: 2d26b7f3ec173ee642b94bc593a656ecb2332f69
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 20 08:55:10 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 20 09:33:43 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d26b7f3
7
8 dev-python/manuel: Verison Bump
9
10 Package-Manager: portage-2.2.20.1
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/manuel/Manifest | 1 +
14 .../manuel/files/manuel-1.8.0-rm_zope_test.patch | 120 +++++++++++++++++++++
15 dev-python/manuel/manuel-1.8.0.ebuild | 32 ++++++
16 3 files changed, 153 insertions(+)
17
18 diff --git a/dev-python/manuel/Manifest b/dev-python/manuel/Manifest
19 index 43cfad1..f0b48b4 100644
20 --- a/dev-python/manuel/Manifest
21 +++ b/dev-python/manuel/Manifest
22 @@ -1 +1,2 @@
23 DIST manuel-1.7.1-20130316.tar.bz2 24910 SHA256 4b23c562c84fe771d897b1ce237ba065940ffd5a847bc23bb6ec81070e0d0824 SHA512 94dab56165b92761aa710aba057338ba3062faa375600885e9943e067726ced492493bee5d203883dad604d424f8599fab35fd605e024e2a4139fb5e1a32698e WHIRLPOOL 75909a8fb55f264198733b3b0b0344c5a8e2039e23e55daab2a3dc4aba67ab7d0226ec4197e588a3625cf38062940008ebf0ca8c72a42b8b5077e2e1c38f39dd
24 +DIST manuel-1.8.0.tar.gz 207600 SHA256 a974d7e83652b26be30f6f513fac95d28b9ffa5ae2819a5c63e2ef8594913eb6 SHA512 8099df44cfd28c8ac6256f346bf8cd36091893a38d3c297099866b1a5db97286b9c9e69f3f12054d7eee9ae3985ca0a003d7b2cc082d28d59850bbcad6b57c57 WHIRLPOOL 7870484499d8c18916bf8349ed1a8a9be84eb074440b8c875f3a0468137edf45425a51545da3517a6c81a862708114eea2fa8561eaa219ccb1ff958d8fcb2afe
25
26 diff --git a/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch b/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch
27 new file mode 100644
28 index 0000000..d1b61cc
29 --- /dev/null
30 +++ b/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch
31 @@ -0,0 +1,120 @@
32 + setup.py | 6 ------
33 + src/manuel/index.txt | 26 ++++++++------------------
34 + src/manuel/tests.py | 13 +++++++++----
35 + 3 files changed, 17 insertions(+), 28 deletions(-)
36 +
37 +diff --git a/setup.py b/setup.py
38 +index 4561779..b6730c8 100644
39 +--- a/setup.py
40 ++++ b/setup.py
41 +@@ -20,8 +20,6 @@ with open('README.rst') as readme:
42 + with open('CHANGES.rst') as changes:
43 + long_description = readme.read() + '\n\n' + changes.read()
44 +
45 +-tests_require = ['zope.testing']
46 +-
47 + setup(
48 + name='manuel',
49 + version='1.8.0',
50 +@@ -44,10 +42,6 @@ setup(
51 + 'License :: OSI Approved :: Apache Software License',
52 + ],
53 + license='Apache Software License, Version 2.0',
54 +- extras_require={
55 +- 'tests': tests_require,
56 +- },
57 +- tests_require=tests_require,
58 + test_suite='manuel.tests.test_suite',
59 + install_requires=[
60 + 'setuptools',
61 +diff --git a/src/manuel/index.txt b/src/manuel/index.txt
62 +index c1d85f3..a315317 100644
63 +--- a/src/manuel/index.txt
64 ++++ b/src/manuel/index.txt
65 +@@ -166,16 +166,16 @@ can pass in your own class to `TestSuite`.
66 +
67 + .. code-block:: python
68 +
69 +- import os.path
70 +- import manuel.testing
71 ++ import os.path
72 ++ import manuel.testing
73 +
74 +- class StripDirsTestCase(manuel.testing.TestCase):
75 +- def shortDescription(self):
76 +- return os.path.basename(str(self))
77 +- suite = manuel.testing.TestSuite(
78 +- m, path_to_test, TestCase=StripDirsTestCase)
79 ++ class StripDirsTestCase(manuel.testing.TestCase):
80 ++ def shortDescription(self):
81 ++ return os.path.basename(str(self))
82 ++ suite = manuel.testing.TestSuite(
83 ++ m, path_to_test, TestCase=StripDirsTestCase)
84 +
85 +- >>> list(suite)[0].shortDescription()
86 ++ list(suite)[0].shortDescription()
87 + 'bugs.txt'
88 +
89 +
90 +@@ -236,16 +236,6 @@ checkers <http://docs.python.org/library/doctest.html#outputchecker-objects>`_
91 + smoothes over the differences between CPython's and PyPy's NameError
92 + messages:
93 +
94 +-.. code-block:: python
95 +-
96 +- import re
97 +- import zope.testing.renormalizing
98 +- checker = zope.testing.renormalizing.RENormalizing([
99 +- (re.compile(r"NameError: global name '([a-zA-Z0-9_]+)' is not defined"),
100 +- r"NameError: name '\1' is not defined"),
101 +- ])
102 +-
103 +-
104 + .. reset-globs
105 + .. _capture:
106 +
107 +diff --git a/src/manuel/tests.py b/src/manuel/tests.py
108 +index 07723a6..b1a3a76 100644
109 +--- a/src/manuel/tests.py
110 ++++ b/src/manuel/tests.py
111 +@@ -11,11 +11,12 @@ import manuel.testing
112 + import os.path
113 + import re
114 + import unittest
115 +-import zope.testing.renormalizing
116 +
117 + here = os.path.dirname(os.path.abspath(__file__))
118 +
119 +-checker = zope.testing.renormalizing.RENormalizing([
120 ++try:
121 ++ import zope.testing.renormalizing
122 ++ checker = zope.testing.renormalizing.RENormalizing([
123 + (re.compile(r"<unittest\.result\.TestResult"), '<unittest.TestResult'),
124 + # PyPy spells some error messages differently
125 + (re.compile(r"NameError: global name '([a-zA-Z0-9_]+)' is not defined"),
126 +@@ -25,7 +26,9 @@ checker = zope.testing.renormalizing.RENormalizing([
127 + r"<\1 object"),
128 + (re.compile(r"<SRE_Match object"),
129 + r"<_sre.SRE_Match object"),
130 +-])
131 ++ ])
132 ++except ImportError:
133 ++ pass
134 +
135 +
136 + def turtle_on_the_bottom_test():
137 +@@ -59,7 +62,6 @@ def test_suite():
138 + optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
139 +
140 + m = manuel.ignore.Manuel()
141 +- m += manuel.doctest.Manuel(optionflags=optionflags, checker=checker)
142 + m += manuel.codeblock.Manuel()
143 + m += manuel.capture.Manuel()
144 + m += manuel.testcase.SectionManuel()
145 +@@ -73,3 +75,6 @@ def test_suite():
146 + suite,
147 + doctest.DocTestSuite(),
148 + ))
149 ++
150 ++if __name__ == '__main__':
151 ++ unittest.TextTestRunner().run(test_suite())
152
153 diff --git a/dev-python/manuel/manuel-1.8.0.ebuild b/dev-python/manuel/manuel-1.8.0.ebuild
154 new file mode 100644
155 index 0000000..23938d0
156 --- /dev/null
157 +++ b/dev-python/manuel/manuel-1.8.0.ebuild
158 @@ -0,0 +1,32 @@
159 +# Copyright 1999-2015 Gentoo Foundation
160 +# Distributed under the terms of the GNU General Public License v2
161 +# $Id$
162 +
163 +EAPI=5
164 +
165 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
166 +
167 +inherit distutils-r1
168 +
169 +DESCRIPTION="Manuel lets you build tested documentation"
170 +HOMEPAGE="https://github.com/benji-york/manuel/ https://pypi.python.org/pypi/manuel"
171 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
172 +
173 +LICENSE="Apache-2.0"
174 +SLOT="0"
175 +KEYWORDS="~amd64 ~x86"
176 +IUSE=""
177 +
178 +RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
179 +DEPEND="${RDEPEND}
180 + dev-python/setuptools[${PYTHON_USEDEP}]"
181 +# Required to run tests
182 +DISTUTILS_IN_SOURCE_BUILD=1
183 +
184 +DOCS=( CHANGES.rst )
185 +
186 +PATCHES=( "${FILESDIR}"/${P}-rm_zope_test.patch )
187 +
188 +python_test() {
189 + PYTHONPATH=src/:${PYTHONPATH} esetup.py test
190 +}