From d09ded8b0cb5082afdfd23107d541435a25732ef Mon Sep 17 00:00:00 2001 From: Paul Brussee Date: Mon, 11 Jul 2016 19:20:08 +0200 Subject: [PATCH] add recipe for python coverage with utf-8 fallback patch --- pythonforandroid/recipes/coverage/__init__.py | 19 +++++++++++++++++++ .../recipes/coverage/fallback-utf8.patch | 12 ++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 pythonforandroid/recipes/coverage/__init__.py create mode 100644 pythonforandroid/recipes/coverage/fallback-utf8.patch diff --git a/pythonforandroid/recipes/coverage/__init__.py b/pythonforandroid/recipes/coverage/__init__.py new file mode 100644 index 0000000000..a37358be94 --- /dev/null +++ b/pythonforandroid/recipes/coverage/__init__.py @@ -0,0 +1,19 @@ +from pythonforandroid.toolchain import PythonRecipe + + +class CoverageRecipe(PythonRecipe): + + version = '4.1' + + url = 'https://pypi.python.org/packages/2d/10/6136c8e10644c16906edf4d9f7c782c0f2e7ed47ff2f41f067384e432088/coverage-{version}.tar.gz' + + depends = ['hostpython2', 'setuptools'] + + patches = ['fallback-utf8.patch'] + + site_packages_name = 'coverage' + + call_hostpython_via_targetpython = False + + +recipe = CoverageRecipe() diff --git a/pythonforandroid/recipes/coverage/fallback-utf8.patch b/pythonforandroid/recipes/coverage/fallback-utf8.patch new file mode 100644 index 0000000000..6d251c475c --- /dev/null +++ b/pythonforandroid/recipes/coverage/fallback-utf8.patch @@ -0,0 +1,12 @@ +--- coverage-4.1/coverage/misc.py 2016-02-13 20:04:35.000000000 +0100 ++++ patch/coverage/misc.py 2016-07-11 17:07:22.656603295 +0200 +@@ -166,7 +166,8 @@ + encoding = ( + getattr(outfile, "encoding", None) or + getattr(sys.__stdout__, "encoding", None) or +- locale.getpreferredencoding() ++ locale.getpreferredencoding() or ++ 'utf-8' + ) + return encoding +