summarylogtreecommitdiffstats
path: root/reorganize-enchant-modules.patch
blob: 1e81b0abe622f48a3791ab9e4f9be035c64317d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
diff -ruN a/enchant/checker/__init__.py b/enchant/checker/__init__.py
--- a/enchant/checker/__init__.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/checker/__init__.py	2013-12-19 12:55:19.346979942 +0100
@@ -48,11 +48,11 @@
 import array
 import warnings
 
-import enchant
-from enchant.errors import *
-from enchant.tokenize import get_tokenizer
-from enchant.utils import bytes, unicode, basestring, next
-from enchant.utils import get_default_language
+from pack import enchant
+from pack.enchant.errors import *
+from pack.enchant.tokenize import get_tokenizer
+from pack.enchant.utils import bytes, unicode, basestring, next
+from pack.enchant.utils import get_default_language
 
 
 class SpellChecker:
diff -ruN a/enchant/checker/tests.py b/enchant/checker/tests.py
--- a/enchant/checker/tests.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/checker/tests.py	2013-12-19 12:55:57.883873755 +0100
@@ -35,11 +35,11 @@
 
 import unittest
 
-import enchant
-import enchant.tokenize
-from enchant.utils import *
-from enchant.errors import *
-from enchant.checker import *
+from pack import enchant
+from pack import enchant.tokenize
+from pack.enchant.utils import *
+from pack.enchant.errors import *
+from pack.enchant.checker import *
 
 
 class TestChecker(unittest.TestCase):
@@ -196,7 +196,7 @@
 
     def test_pwl(self):
         """Test checker loop with PWL."""
-        from enchant import DictWithPWL
+        from pack.enchant import DictWithPWL
         d = DictWithPWL("en_US",None,None)
         txt = "I am sme text to be cheked with personal list of cheked words"
         chkr = SpellChecker(d,txt)
diff -ruN a/enchant/_enchant.py b/enchant/_enchant.py
--- a/enchant/_enchant.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/_enchant.py	2013-12-19 12:56:33.500751458 +0100
@@ -52,9 +52,9 @@
 from ctypes import *
 from ctypes.util import find_library
 
-from enchant import utils
-from enchant.errors import *
-from enchant.utils import unicode
+from pack.enchant import utils
+from pack.enchant.errors import *
+from pack.enchant.utils import unicode
 
 # Locate and load the enchant dll.
 # We've got several options based on the host platform.
diff -ruN a/enchant/__init__.py b/enchant/__init__.py
--- a/enchant/__init__.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/__init__.py	2013-12-19 12:58:13.108013777 +0100
@@ -89,15 +89,15 @@
 import os
 
 try:
-    from enchant import _enchant as _e
+    from pack.enchant import _enchant as _e
 except ImportError:
     if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB",False):
         raise
     _e = None
 
-from enchant.errors import *
-from enchant.utils import EnchantStr, get_default_language
-from enchant.pypwl import PyPWL
+from pack.enchant.errors import *
+from pack.enchant.utils import EnchantStr, get_default_language
+from pack.enchant.pypwl import PyPWL
 
 #  Due to the unfortunate name collision between the enchant "tokenize" module
 #  and the stdlib "tokenize" module, certain values of sys.path can cause
@@ -890,9 +890,8 @@
 # Run unit tests when called from comand-line
 if __name__ == "__main__":
     import sys
-    import enchant.tests
-    res = enchant.tests.runtestsuite()
+    import pack.enchant.tests
+    res = pack.enchant.tests.runtestsuite()
     if len(res.errors) > 0 or len(res.failures) > 0:
         sys.exit(1)
     sys.exit(0)
-
diff -ruN a/enchant/tests.py b/enchant/tests.py
--- a/enchant/tests.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/tests.py	2013-12-19 13:00:33.628867176 +0100
@@ -42,10 +42,10 @@
 except ImportError:
     subprocess = None
 
-import enchant
-from enchant import *
-from enchant import _enchant as _e
-from enchant.utils import unicode, raw_unicode, printf, trim_suggestions
+import pack.enchant
+from pack.enchant import *
+from pack.enchant import _enchant as _e
+from pack.enchant.utils import unicode, raw_unicode, printf, trim_suggestions
 
 
 def runcmd(cmd):
@@ -443,19 +443,19 @@
 
     def test_docstrings(self):
         """Test that all our docstrings are error-free."""
-        import enchant
-        import enchant.utils
-        import enchant.pypwl
-        import enchant.tokenize
-        import enchant.tokenize.en
-        import enchant.checker
-        import enchant.checker.CmdLineChecker
+        import pack.enchant
+        import pack.enchant.utils
+        import pack.enchant.pypwl
+        import pack.enchant.tokenize
+        import pack.enchant.tokenize.en
+        import pack.enchant.checker
+        import pack.enchant.checker.CmdLineChecker
         try:
-            import enchant.checker.GtkSpellCheckerDialog
+            import pack.enchant.checker.GtkSpellCheckerDialog
         except ImportError:
             pass
         try:
-            import enchant.checker.wxSpellCheckerDialog
+            import pack.enchant.checker.wxSpellCheckerDialog
         except ImportError:
             pass
         errors = []
@@ -471,10 +471,10 @@
         self.assertEqual(len(errors),0)
 
     def _check_docstrings(self,obj,errors):
-        import enchant
+        import pack.enchant
         if hasattr(obj,"__doc__"):
             skip_errors = [w for w in getattr(obj,"_DOC_ERRORS",[])]
-            chkr = enchant.checker.SpellChecker("en_AU",obj.__doc__,filters=[enchant.tokenize.URLFilter])
+            chkr = pack.enchant.checker.SpellChecker("en_AU",obj.__doc__,filters=[pack.enchant.tokenize.URLFilter])
             for err in chkr:
                 if len(err.word) == 1:
                     continue
@@ -590,9 +590,9 @@
 
 
 def buildtestsuite(recurse=True):
-    from enchant.checker.tests import TestChecker
-    from enchant.tokenize.tests import TestTokenization, TestFilters
-    from enchant.tokenize.tests import TestTokenizeEN
+    from pack.enchant.checker.tests import TestChecker
+    from pack.enchant.tokenize.tests import TestTokenization, TestFilters
+    from pack.enchant.tokenize.tests import TestTokenizeEN
     suite = unittest.TestSuite()
     if recurse:
         suite.addTest(unittest.makeSuite(TestInstallEnv))
diff -ruN a/enchant/tokenize/en.py b/enchant/tokenize/en.py
--- a/enchant/tokenize/en.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/tokenize/en.py	2013-12-19 13:53:19.589749401 +0100
@@ -38,11 +38,11 @@
 
 import unicodedata
 
-import enchant.tokenize
-from enchant.utils import unicode
+import pack.enchant.tokenize
+from pack.enchant.utils import unicode
 
 
-class tokenize(enchant.tokenize.tokenize):
+class tokenize(pack.enchant.tokenize.tokenize):
     """Iterator splitting text into words, reporting position.
     
     This iterator takes a text string as input, and yields tuples
diff -ruN a/enchant/tokenize/__init__.py b/enchant/tokenize/__init__.py
--- a/enchant/tokenize/__init__.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/tokenize/__init__.py	2013-12-19 13:53:41.543239072 +0100
@@ -103,9 +103,9 @@
 import re
 import warnings
 
-import enchant
-from enchant.utils import next, xrange
-from enchant.errors import *
+import pack.enchant
+from pack.enchant.utils import next, xrange
+from pack.enchant.errors import *
 
 #  For backwards-compatability.  This will eventually be removed, but how
 #  does one mark a module-level constant as deprecated?
diff -ruN a/enchant/utils.py b/enchant/utils.py
--- a/enchant/utils.py	2011-10-13 23:17:12.000000000 +0200
+++ b/enchant/utils.py	2013-12-19 13:54:12.970130219 +0100
@@ -47,7 +47,8 @@
 import sys
 import codecs
 
-from enchant.errors import *
+from pack.enchant.errors import *
+
 
 # Attempt to access local language information
 try: