From 5a28743fc6d3411d0231123947f7c3ff146caa6d Mon Sep 17 00:00:00 2001 From: Juan Toledo Date: Mon, 10 Dec 2018 18:29:56 +0100 Subject: [PATCH] No need to decode into unicode when running in python 3 --- pythonforandroid/recipes/android/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/android/__init__.py b/pythonforandroid/recipes/android/__init__.py index 5c8e0183f9..772c3dd277 100644 --- a/pythonforandroid/recipes/android/__init__.py +++ b/pythonforandroid/recipes/android/__init__.py @@ -4,6 +4,7 @@ from pythonforandroid import logger from os.path import join +from sys import version_info class AndroidRecipe(IncludedFilesBehaviour, CythonRecipe): @@ -30,7 +31,8 @@ def prebuild_arch(self, arch): th = '#define {} {}\n' tpy = '{} = {}\n' - bootstrap = bootstrap_name = self.ctx.bootstrap.name.decode('utf-8') + bootstrap = self.ctx.bootstrap.name + bootstrap = bootstrap_name = bootstrap if version_info >= (3, ) else bootstrap.decode('utf-8') is_sdl2 = bootstrap_name in ('sdl2', 'sdl2python3', 'sdl2_gradle') is_pygame = bootstrap_name in ('pygame',) is_webview = bootstrap_name in ('webview',)