add / update recipes and build changes for Python 3.6.6 compatibility (#315)
* add / update recipes and build changes for Python 3.6.6 compatibility * include Python 3 apt packages in travis build script * use Python 3.6 in Travis * Enable _blake2 and _sha3 in Python 3. Remove unnecessary files. * change zope.interface version * update cffi version
This commit is contained in:
parent
f12460e83a
commit
e08f6ee73c
80 changed files with 2063 additions and 3644 deletions
p4a/pythonforandroid
|
@ -1,4 +1,3 @@
|
|||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
@ -16,7 +15,7 @@ if not six.PY3:
|
|||
stderr = codecs.getwriter('utf8')(stderr)
|
||||
|
||||
if six.PY2:
|
||||
unistr = unicode
|
||||
unistr = unicode # noqa F821
|
||||
else:
|
||||
unistr = str
|
||||
|
||||
|
@ -43,6 +42,7 @@ class LevelDifferentiatingFormatter(logging.Formatter):
|
|||
Err_Style.RESET_ALL) + record.msg
|
||||
return super(LevelDifferentiatingFormatter, self).format(record)
|
||||
|
||||
|
||||
logger = logging.getLogger('p4a')
|
||||
if not hasattr(logger, 'touched'): # Necessary as importlib reloads
|
||||
# this, which would add a second
|
||||
|
@ -72,6 +72,7 @@ class colorama_shim(object):
|
|||
def enable(self, enable):
|
||||
self._enabled = enable
|
||||
|
||||
|
||||
Out_Style = colorama_shim(Colo_Style)
|
||||
Out_Fore = colorama_shim(Colo_Fore)
|
||||
Err_Style = colorama_shim(Colo_Style)
|
||||
|
@ -173,6 +174,8 @@ def shprint(command, *args, **kwargs):
|
|||
msg_width = columns - len(msg_hdr) - 1
|
||||
output = command(*args, **kwargs)
|
||||
for line in output:
|
||||
if isinstance(line, bytes):
|
||||
line = line.decode('utf-8', errors='replace')
|
||||
if logger.level > logging.DEBUG:
|
||||
msg = line.replace(
|
||||
'\n', ' ').replace(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue