[Python-modules-commits] [pyenchant] 01/08: Import pyenchant_1.6.11.orig.tar.gz

Piotr Ożarowski piotr at moszumanska.debian.org
Fri Sep 29 08:16:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository pyenchant.

commit e95dd26b09bf24865eaf911f4e3a00f57e3d1c47
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Fri Sep 29 09:58:40 2017 +0200

    Import pyenchant_1.6.11.orig.tar.gz
---
 LICENSE.txt                              |   0
 MANIFEST.in                              |   0
 PKG-INFO                                 |   2 +-
 README.txt                               |   0
 TODO.txt                                 |   0
 enchant/__init__.py                      |  20 ++--
 enchant/_enchant.py                      |   0
 enchant/checker/CmdLineChecker.py        | 175 +++++++++++++++++++++++--------
 enchant/checker/GtkSpellCheckerDialog.py |   0
 enchant/checker/__init__.py              |   0
 enchant/checker/tests.py                 |   0
 enchant/checker/wxSpellCheckerDialog.py  |   0
 enchant/errors.py                        |   0
 enchant/pypwl.py                         |   0
 enchant/tests.py                         |  18 ++--
 enchant/tokenize/__init__.py             |  36 ++++++-
 enchant/tokenize/en.py                   |  22 +++-
 enchant/tokenize/tests.py                |  13 +++
 enchant/utils.py                         |   0
 ez_setup.py                              |   0
 pyenchant.egg-info/PKG-INFO              |   2 +-
 pyenchant.egg-info/SOURCES.txt           |   0
 pyenchant.egg-info/dependency_links.txt  |   0
 pyenchant.egg-info/eager_resources.txt   |  12 +--
 pyenchant.egg-info/top_level.txt         |   0
 setup.cfg                                |   2 +-
 setup.py                                 |   4 +-
 tools/setup.py2exe.py                    |   0
 tools/shootout.py                        |   0
 tools/test_multiprocessing.py            |   0
 tools/wx_example.py                      |   0
 31 files changed, 228 insertions(+), 78 deletions(-)

diff --git a/LICENSE.txt b/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/MANIFEST.in b/MANIFEST.in
old mode 100644
new mode 100755
diff --git a/PKG-INFO b/PKG-INFO
old mode 100644
new mode 100755
index 2f57d0e..07fbccd
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyenchant
-Version: 1.6.7
+Version: 1.6.11
 Summary: Python bindings for the Enchant spellchecking system
 Home-page: https://pythonhosted.org/pyenchant/
 Author: Ryan Kelly
diff --git a/README.txt b/README.txt
old mode 100644
new mode 100755
diff --git a/TODO.txt b/TODO.txt
old mode 100644
new mode 100755
diff --git a/enchant/__init__.py b/enchant/__init__.py
old mode 100644
new mode 100755
index 0f5ee89..016d32f
--- a/enchant/__init__.py
+++ b/enchant/__init__.py
@@ -81,7 +81,7 @@ _DOC_ERRORS = ['enchnt','enchnt','incant','fr']
 # Make version info available
 __ver_major__ = 1
 __ver_minor__ = 6
-__ver_patch__ = 7
+__ver_patch__ = 11
 __ver_sub__ = ""
 __version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
                               __ver_patch__,__ver_sub__)
@@ -479,7 +479,10 @@ class Broker(_EnchantObject):
         provider backends.  See the method 'set_param' for more details.
         """
         name = EnchantStr(name)
-        return name.decode(_e.broker_get_param(self._this,name.encode()))
+        param = _e.broker_get_param(self._this,name.encode())
+        if param is not None:
+            param = name.decode(param)
+        return param
     get_param._DOC_ERRORS = ["param"]
 
     def set_param(self,name,value):
@@ -490,9 +493,10 @@ class Broker(_EnchantObject):
         any directories given in the "enchant.myspell.dictionary.path"
         parameter when looking for its dictionary files.
         """
-        name = EnchantStr(name)
-        value = EnchantStr(value)
-        _e.broker_set_param(self._this,name.encode(),value.encode())
+        name = EnchantStr(name).encode()
+        if value is not None:
+            value = EnchantStr(value).encode()
+        _e.broker_set_param(self._this,name,value)
 
 
 
@@ -934,10 +938,14 @@ def get_enchant_version():
 
 
 # Run unit tests when called from command-line
-if __name__ == "__main__":
+def _runtestsuite():
     import sys
     import enchant.tests
     res = enchant.tests.runtestsuite()
     if len(res.errors) > 0 or len(res.failures) > 0:
         sys.exit(1)
     sys.exit(0)
+
+
+if __name__ == "__main__":
+    _runtestsuite()
diff --git a/enchant/_enchant.py b/enchant/_enchant.py
old mode 100644
new mode 100755
diff --git a/enchant/checker/CmdLineChecker.py b/enchant/checker/CmdLineChecker.py
old mode 100644
new mode 100755
index f558c63..80273e2
--- a/enchant/checker/CmdLineChecker.py
+++ b/enchant/checker/CmdLineChecker.py
@@ -30,7 +30,7 @@
 """
 
     enchant.checker.CmdLineChecker:  Command-Line spell checker
-    
+
     This module provides the class CmdLineChecker, which interactively
     spellchecks a piece of text by interacting with the user on the
     command line.  It can also be run as a script to spellcheck a file.
@@ -42,9 +42,58 @@ import sys
 from enchant.checker import SpellChecker
 from enchant.utils import printf
 
+try:
+  get_input = raw_input # Python 2.x
+except NameError:
+  get_input = input # Python 3.x
+
+# Helpers
+
+colors = {
+    'normal'         : "\x1b[0m",
+    'black'          : "\x1b[30m",
+    'red'            : "\x1b[31m",
+    'green'          : "\x1b[32m",
+    'yellow'         : "\x1b[33m",
+    'blue'           : "\x1b[34m",
+    'purple'         : "\x1b[35m",
+    'cyan'           : "\x1b[36m",
+    'grey'           : "\x1b[90m",
+    'gray'           : "\x1b[90m",
+    'bold'           : "\x1b[1m"
+}
+
+def color(string, color='normal', prefix=''):
+    """
+    Change text color for the Linux terminal.
+
+    Args:
+        string (str): String to colorify
+        color (str): Color to colorify the string in the following list:
+            black, red, green, yellow, blue, purple, cyan, gr[ae]y
+        prefix (str): Prefix to add to string (ex: Beginning of line graphics)
+    """
+    if sys.stdout.isatty():
+        return colors[color] + prefix + string + colors['normal']
+    else:
+        return prefix + string
+
+def success(string):
+    return "[" + color("+", color='green') + "] " + string
+
+def error(string):
+    return "[" + color("!", color='red') + "] " + string
+
+def warning(string):
+    return "[" + color("*", color='yellow') + "] " + string
+
+def info(string):
+    return "[" + color(".", color='blue') + "] " + string
+
+
 class CmdLineChecker:
     """A simple command-line spell checker.
-    
+
     This class implements a simple command-line spell checker.  It must
     be given a SpellChecker instance to operate on, and interacts with
     the user by printing instructions on stdout and reading commands from
@@ -55,95 +104,133 @@ class CmdLineChecker:
     def __init__(self):
         self._stop = False
         self._checker = None
-        
+
     def set_checker(self,chkr):
         self._checker = chkr
-    
+
     def get_checker(self,chkr):
         return self._checker
-        
+
     def run(self):
         """Run the spellchecking loop."""
         self._stop = False
         for err in self._checker:
             self.error = err
-            printf(["ERROR:", err.word.encode('utf8')])
-            printf(["HOW ABOUT:", err.suggest()])
+            self.print_error()
+            self.print_suggestions()
             status = self.read_command()
             while not status and not self._stop:
                 status = self.read_command()
             if self._stop:
                 break
-        printf(["DONE"])
-    
+
+    def print_error(self):
+        """print the spelling error to the console.
+
+        Prints the misspelled word along with 100 characters of
+        context on either side.  This number was arbitrarily chosen
+        and could be modified to be tunable or changed entirely.
+        It seems to be enough context to be helpful though
+        """
+        error_string = self._build_context(self.error.get_text(), self.error.word, self.error.wordpos)
+        printf([error("ERROR: %s" % color(self.error.word, color='red'))])
+        printf([info("")])
+        printf([info(error_string)])
+        printf([info("")])
+
+    @staticmethod
+    def _build_context(text, error_word, error_start):
+        """creates the context line.
+
+        This function will search forward and backward
+        from the error word to find the nearest newlines.
+        it will return this line with the error word
+        colored red."""
+        start_newline = text.rfind('\n', 0, error_start)
+        end_newline = text.find('\n', error_start)
+        return text[start_newline+1:end_newline].replace(error_word, color(error_word, color="red"))
+
+    def print_suggestions(self):
+        """Prints out the suggestions for a given error.
+
+        This function will add vertical pipes to separate choices
+        as well as the index of the replacement as expected by the replace function.
+        I don't believe zero indexing is a problem as long as the user can see the numbers :)
+        """
+        result = ""
+        suggestions = self.error.suggest()
+        for index, sugg in enumerate(suggestions):
+            if index is 0:
+                result = result + color(str(index), color='yellow') + ": " + color(sugg, color='bold')
+            else:
+                result = result + " | " + color(str(index), color='yellow') + ": " + color(sugg, color='bold')
+        printf([info("HOW ABOUT:"), result])
+
     def print_help(self):
-        printf(["0..N:    replace with the numbered suggestion"])
-        printf(["R0..rN:  always replace with the numbered suggestion"])
-        printf(["i:       ignore this word"])
-        printf(["I:       always ignore this word"])
-        printf(["a:       add word to personal dictionary"])
-        printf(["e:       edit the word"])
-        printf(["q:       quit checking"])
-        printf(["h:       print this help message"])
-        printf(["----------------------------------------------------"])
-        printf(["HOW ABOUT:", self.error.suggest()])
-    
+        printf([info(color("0", color='yellow') + ".." + color("N", color='yellow') + ":\t" + color("replace", color='bold') + " with the numbered suggestion")])
+        printf([info(color("R", color='cyan') + color("0", color='yellow') + ".." + color("R", color='cyan') + color("N", color='yellow') + ":\t" + color("always replace", color='bold') + " with the numbered suggestion")])
+        printf([info(color("i", color='cyan') + ":\t\t" + color("ignore", color='bold') + " this word")])
+        printf([info(color("I", color='cyan') + ":\t\t" + color("always ignore", color='bold') + " this word")])
+        printf([info(color("a", color='cyan') + ":\t\t" + color("add", color='bold') + " word to personal dictionary")])
+        printf([info(color("e", color='cyan') + ":\t\t" + color("edit", color='bold') + " the word")])
+        printf([info(color("q", color='cyan') + ":\t\t" + color("quit", color='bold') + " checking")])
+        printf([info(color("h", color='cyan') + ":\t\tprint this " + color("help", color='bold') + " message")])
+        printf([info("----------------------------------------------------")])
+        self.print_suggestions()
+
     def read_command(self):
-        try:
-            cmd = raw_input(">> ") # Python 2.x
-        except NameError:
-            cmd = input(">> ") # Python 3.x
+        cmd = get_input(">> ")
         cmd = cmd.strip()
-        
+
         if cmd.isdigit():
             repl = int(cmd)
             suggs = self.error.suggest()
             if repl >= len(suggs):
-                printf(["No suggestion number", repl])
+                printf([warning("No suggestion number"), repl])
                 return False
-            printf(["Replacing '%s' with '%s'" % (self.error.word,suggs[repl])])
+            printf([success("Replacing '%s' with '%s'" % (color(self.error.word, color='red'),color(suggs[repl], color='green')))])
             self.error.replace(suggs[repl])
             return True
-        
+
         if cmd[0] == "R":
             if not cmd[1:].isdigit():
-                printf(["Badly formatted command (try 'help')"])
+                printf([warning("Badly formatted command (try 'help')")])
                 return False
             repl = int(cmd[1:])
             suggs = self.error.suggest()
             if repl >= len(suggs):
-                printf(["No suggestion number", repl])
+                printf([warning("No suggestion number"), repl])
                 return False
             self.error.replace_always(suggs[repl])
             return True
-        
+
         if cmd == "i":
             return True
-        
+
         if cmd == "I":
             self.error.ignore_always()
             return True
-            
+
         if cmd == "a":
             self.error.add()
             return True
-        
+
         if cmd == "e":
-            repl = raw_input("New Word: ")
+            repl = get_input(info("New Word: "))
             self.error.replace(repl.strip())
             return True
-             
+
         if cmd == "q":
             self._stop = True
             return True
-        
+
         if "help".startswith(cmd.lower()):
             self.print_help()
             return False
-        
-        printf(["Badly formatted command (try 'help')"])
+
+        printf([warning("Badly formatted command (try 'help')")])
         return False
-        
+
     def run_on_file(self,infile,outfile=None,enc=None):
         """Run spellchecking on the named file.
         This method can be used to run the spellchecker over the named file.
@@ -158,7 +245,11 @@ class CmdLineChecker:
         if enc is not None:
             inStr = inStr.decode(enc)
         self._checker.set_text(inStr)
+        begin_msg = "Beginning spell check of %s" % infile
+        printf([info(begin_msg)])
+        printf([info("-" * len(begin_msg))])
         self.run()
+        printf([success("Completed spell check of %s" % infile)])
         outStr = self._checker.get_text()
         if enc is not None:
             outStr = outStr.encode(enc)
@@ -171,7 +262,7 @@ class CmdLineChecker:
         outF.write(outStr)
         outF.close()
     run_on_file._DOC_ERRORS = ["outfile","infile","outfile","stdout"]
-        
+
 def _run_as_script():
     """Run the command-line spellchecker as a script.
     This function allows the spellchecker to be invoked from the command-line
@@ -197,8 +288,6 @@ def _run_as_script():
     cmdln = CmdLineChecker()
     cmdln.set_checker(chkr)
     cmdln.run_on_file(args[0],opts.outfile,opts.enc)
-    
 
-    
 if __name__ == "__main__":
     _run_as_script()
diff --git a/enchant/checker/GtkSpellCheckerDialog.py b/enchant/checker/GtkSpellCheckerDialog.py
old mode 100644
new mode 100755
diff --git a/enchant/checker/__init__.py b/enchant/checker/__init__.py
old mode 100644
new mode 100755
diff --git a/enchant/checker/tests.py b/enchant/checker/tests.py
old mode 100644
new mode 100755
diff --git a/enchant/checker/wxSpellCheckerDialog.py b/enchant/checker/wxSpellCheckerDialog.py
old mode 100644
new mode 100755
diff --git a/enchant/errors.py b/enchant/errors.py
old mode 100644
new mode 100755
diff --git a/enchant/pypwl.py b/enchant/pypwl.py
old mode 100644
new mode 100755
diff --git a/enchant/tests.py b/enchant/tests.py
old mode 100644
new mode 100755
index 737c013..be17870
--- a/enchant/tests.py
+++ b/enchant/tests.py
@@ -48,9 +48,11 @@ from enchant import _enchant as _e
 from enchant.utils import unicode, raw_unicode, printf, trim_suggestions
 
 
-def runcmd(cmd):
+def runcmd(cmd, **kwds):
     if subprocess is not None:
-        kwds = dict(stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
+        kwds["stdout"] = subprocess.PIPE
+        kwds["stderr"] = subprocess.PIPE
+        kwds["shell"] = True
         p = subprocess.Popen(cmd,**kwds)
         (stdout,stderr) = p.communicate()
         if p.returncode:
@@ -153,9 +155,8 @@ class TestBroker(unittest.TestCase):
         self.assertTrue(d1)
 
     def test_GetSetParam(self):
-        try:
-            self.broker.get_param("pyenchant.unittest")
-        except AttributeError:
+        # Older enchnt versions do not have these functions.
+        if not hasattr(_e.broker_get_param,"argtypes"):
             return
         self.assertEqual(self.broker.get_param("pyenchant.unittest"),None)
         self.broker.set_param("pyenchant.unittest","testing")
@@ -535,8 +536,11 @@ class TestInstallEnv(unittest.TestCase):
         if str is not unicode and isinstance(insdir,unicode):
             insdir = insdir.encode(sys.getfilesystemencoding())
         os.environ["PYTHONPATH"] = insdir
-        script = os.path.join(insdir,"enchant","__init__.py")
-        res = runcmd("\"%s\" %s" % (sys.executable,script,))
+        testCmd = "import enchant, os; " \
+                  "from os.path import abspath; " \
+                  "assert abspath(os.curdir) in abspath(enchant.__file__); " \
+                  "enchant._runtestsuite()"
+        res = runcmd("\"%s\" -c \"%s\"" % (sys.executable, testCmd), cwd=insdir)
         self.assertEqual(res,0)
 
     def test_basic(self):
diff --git a/enchant/tokenize/__init__.py b/enchant/tokenize/__init__.py
old mode 100644
new mode 100755
index 9a09871..1114d6d
--- a/enchant/tokenize/__init__.py
+++ b/enchant/tokenize/__init__.py
@@ -449,7 +449,7 @@ class Filter(object):
 #  Pre-defined chunkers and filters start here
 
 class URLFilter(Filter):
-    """Filter skipping over URLs.
+    r"""Filter skipping over URLs.
     This filter skips any words matching the following regular expression:
        
            ^[a-zA-Z]+:\/\/[^\s].*
@@ -464,7 +464,7 @@ class URLFilter(Filter):
         return False
 
 class WikiWordFilter(Filter):
-    """Filter skipping over WikiWords.
+    r"""Filter skipping over WikiWords.
     This filter skips any words matching the following regular expression:
        
            ^([A-Z]\w+[A-Z]+\w+)
@@ -478,7 +478,7 @@ class WikiWordFilter(Filter):
         return False
 
 class EmailFilter(Filter):
-    """Filter skipping over email addresses.
+    r"""Filter skipping over email addresses.
     This filter skips any words matching the following regular expression:
        
            ^.+@[^\.].*\.[a-z]{2,}$
@@ -491,6 +491,36 @@ class EmailFilter(Filter):
             return True
         return False
 
+class MentionFilter(Filter):
+    r"""Filter skipping over @mention.
+    This filter skips any words matching the following regular expression:
+       
+           (\A|\s)@(\w+)
+        
+    That is, any words that are @mention.
+    """
+    _DOC_ERRORS = ["zA"]
+    _pattern = re.compile(r"(\A|\s)@(\w+)")
+    def _skip(self,word):
+        if self._pattern.match(word):
+            return True
+        return False
+
+class HashtagFilter(Filter):
+    r"""Filter skipping over #hashtag.
+    This filter skips any words matching the following regular expression:
+       
+           (\A|\s)#(\w+)
+        
+    That is, any words that are #hashtag.
+    """
+    _DOC_ERRORS = ["zA"]
+    _pattern = re.compile(r"(\A|\s)#(\w+)")
+    def _skip(self,word):
+        if self._pattern.match(word):
+            return True
+        return False
+
 
 class HTMLChunker(Chunker):
     """Chunker for breaking up HTML documents into chunks of checkable text.
diff --git a/enchant/tokenize/en.py b/enchant/tokenize/en.py
old mode 100644
new mode 100755
index a849162..34bd659
--- a/enchant/tokenize/en.py
+++ b/enchant/tokenize/en.py
@@ -62,7 +62,7 @@ class tokenize(enchant.tokenize.tokenize):
 
     _DOC_ERRORS = ["pos","pos"]
     
-    def __init__(self,text,valid_chars=("'",)):
+    def __init__(self,text,valid_chars=None):
         self._valid_chars = valid_chars
         self._text = text
         self._offset = 0
@@ -75,12 +75,26 @@ class tokenize(enchant.tokenize.tokenize):
         try:
             char1 = text[0]
         except IndexError:
-            self._consume_alpha = self._consume_alpha_b
+            self._initialize_for_binary()
         else:
             if isinstance(char1,unicode):
-                self._consume_alpha = self._consume_alpha_u
+                self._initialize_for_unicode()
             else:
-                self._consume_alpha = self._consume_alpha_b
+                self._initialize_for_binary()
+
+    def _initialize_for_binary(self):
+        self._consume_alpha = self._consume_alpha_b
+        if self._valid_chars is None:
+            self._valid_chars = ("'",)
+
+    def _initialize_for_unicode(self):
+        self._consume_alpha = self._consume_alpha_u
+        if self._valid_chars is None:
+            # XXX TODO: this doesn't seem to work correctly with the
+            # MySpell provider, disabling for now.
+            # Allow unicode typographic apostrophe
+            #self._valid_chars = (u"'",u"\u2019")
+            self._valid_chars = (u"'",)
     
     def _consume_alpha_b(self,text,offset):
         """Consume an alphabetic character from the given bytestring.
diff --git a/enchant/tokenize/tests.py b/enchant/tokenize/tests.py
old mode 100644
new mode 100755
index 95b8293..daaea48
--- a/enchant/tokenize/tests.py
+++ b/enchant/tokenize/tests.py
@@ -313,3 +313,16 @@ of words. Also need to "test" the handling of 'quoted' words."""
         for (itmO,itmV) in zip(outputT,tokenize_en(inputT)):
             self.assertEqual(itmO,itmV)
 
+    # XXX TODO: the myspell provider doesn't correctly interpret
+    # typographic apostrophe on OSX, disabling for now.
+    #def test_typographic_apostrophe_en(self):
+    #    """"Typographic apostrophes shouldn't be word separators in English."""
+    #    from enchant.tokenize import en
+    #    tknzr = wrap_tokenizer(basic_tokenize, en.tokenize)
+    #    input = u"They\u2019re here"
+    #    output = [(u"They\u2019re", 0), (u"here", 8)]
+    #    self.assertEqual(output, [i for i in tknzr(input)])
+    #    # Typographic apostrophe is only support for unicode inputs.
+    #    if str is not unicode:
+    #        output = [("They", 0), ("re", 7), ("here", 10)]
+    #        self.assertEqual(output, [i for i in tknzr(input.encode('utf8'))])
diff --git a/enchant/utils.py b/enchant/utils.py
old mode 100644
new mode 100755
diff --git a/ez_setup.py b/ez_setup.py
old mode 100644
new mode 100755
diff --git a/pyenchant.egg-info/PKG-INFO b/pyenchant.egg-info/PKG-INFO
old mode 100644
new mode 100755
index 2f57d0e..07fbccd
--- a/pyenchant.egg-info/PKG-INFO
+++ b/pyenchant.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyenchant
-Version: 1.6.7
+Version: 1.6.11
 Summary: Python bindings for the Enchant spellchecking system
 Home-page: https://pythonhosted.org/pyenchant/
 Author: Ryan Kelly
diff --git a/pyenchant.egg-info/SOURCES.txt b/pyenchant.egg-info/SOURCES.txt
old mode 100644
new mode 100755
diff --git a/pyenchant.egg-info/dependency_links.txt b/pyenchant.egg-info/dependency_links.txt
old mode 100644
new mode 100755
diff --git a/pyenchant.egg-info/eager_resources.txt b/pyenchant.egg-info/eager_resources.txt
old mode 100644
new mode 100755
index ec336ef..8b13789
--- a/pyenchant.egg-info/eager_resources.txt
+++ b/pyenchant.egg-info/eager_resources.txt
@@ -1,11 +1 @@
-enchant/lib
-enchant/share
-enchant/lib/libenchant.1.dylib
-enchant/lib/enchant
-enchant/lib/libenchant.1.dylib
-enchant/lib/libglib-2.0.0.dylib
-enchant/lib/libgmodule-2.0.0.dylib
-enchant/lib/libintl.8.dylib
-enchant/lib/libpcre.1.dylib
-enchant/lib/enchant/libenchant_ispell.so
-enchant/lib/enchant/libenchant_myspell.so
+
diff --git a/pyenchant.egg-info/top_level.txt b/pyenchant.egg-info/top_level.txt
old mode 100644
new mode 100755
diff --git a/setup.cfg b/setup.cfg
old mode 100644
new mode 100755
index 4ca3637..76870a7
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bdist_wheel]
-python-tag = py2.py3.cp27.cp32.cp33.cp34.cp35.pp27.pp33
+python-tag = py2.py3.cp27.cp32.cp33.cp34.cp35.cp36.pp27.pp33.pp35
 
 [egg_info]
 tag_build = 
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
index 86155e7..4766b88
--- a/setup.py
+++ b/setup.py
@@ -73,9 +73,11 @@ def osx_make_lib_relocatable(libpath,bundle_dir=None):
     import subprocess
     import shutil
     def do(*cmd):
+        cmd = [c.encode("utf8") for c in cmd]
         subprocess.Popen(cmd).wait()
     def bt(*cmd):
-        return subprocess.Popen(cmd,stdout=subprocess.PIPE).stdout.read()
+        cmd = [c.encode("utf8") for c in cmd]
+        return subprocess.Popen(cmd,stdout=subprocess.PIPE).stdout.read().decode("utf8")
     (dirnm,nm) = os.path.split(libpath)
     if bundle_dir is None:
         bundle_dir = dirnm
diff --git a/tools/setup.py2exe.py b/tools/setup.py2exe.py
old mode 100644
new mode 100755
diff --git a/tools/shootout.py b/tools/shootout.py
old mode 100644
new mode 100755
diff --git a/tools/test_multiprocessing.py b/tools/test_multiprocessing.py
old mode 100644
new mode 100755
diff --git a/tools/wx_example.py b/tools/wx_example.py
old mode 100644
new mode 100755

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyenchant.git



More information about the Python-modules-commits mailing list