From d3fd1ad9e36bdf8f51005cdf97c6ddca1c4a3f27 Mon Sep 17 00:00:00 2001 From: lerela Date: Thu, 16 Apr 2020 17:24:35 +0200 Subject: [PATCH 1/2] Support for both input and raw_input in iOS target to avoid NameError with Python 3 (fixes #1070) --- buildozer/targets/ios.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/buildozer/targets/ios.py b/buildozer/targets/ios.py index 06b274b..01da7d6 100644 --- a/buildozer/targets/ios.py +++ b/buildozer/targets/ios.py @@ -7,11 +7,12 @@ if sys.platform != 'darwin': raise NotImplementedError('Windows platform not yet working for Android') import plistlib -from buildozer import BuildozerCommandException +from buildozer import BuildozerCommandException, IS_PY3 from buildozer.target import Target, no_config from os.path import join, basename, expanduser, realpath from getpass import getpass + PHP_TEMPLATE = ''' Date: Thu, 16 Apr 2020 19:11:13 +0200 Subject: [PATCH 2/2] Encode password before it is saved to file as Python 3 input returns a string, not bytes --- buildozer/targets/ios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildozer/targets/ios.py b/buildozer/targets/ios.py index 01da7d6..e2ac990 100644 --- a/buildozer/targets/ios.py +++ b/buildozer/targets/ios.py @@ -411,7 +411,7 @@ class TargetIos(Target): if save: with open(password_file, 'wb') as fd: - fd.write(password) + fd.write(password.encode()) def get_target(buildozer): return TargetIos(buildozer)