From 761727a9b2f89259318796aa67549fe288ac9908 Mon Sep 17 00:00:00 2001 From: Philipp Auersperg Date: Sat, 17 Nov 2018 14:50:21 +0100 Subject: [PATCH 1/2] fix ndk URLs --- buildozer/targets/android.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 9309a34..47a1d90 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -285,6 +285,13 @@ class TargetAndroid(Target): _version = re.search('(.+?)[a-z]', self.android_ndk_version).group(1) self.buildozer.info('Android NDK is missing, downloading') + # Welcome to the NDK URL hell! + # a list of all NDK URLs up to level 14 can be found here: + # https://gist.github.com/roscopecoltran/43861414fbf341adac3b6fa05e7fad08 + # it seems that from level 11 on the naming schema is consistent + # from 10e on the URLs can be looked up at + # https://developer.android.com/ndk/downloads/older_releases + if platform in ('win32', 'cygwin'): # Checking of 32/64 bits at Windows from: http://stackoverflow.com/a/1405971/798575 import struct @@ -292,14 +299,18 @@ class TargetAndroid(Target): is_64 = (8 * struct.calcsize("P") == 64) elif platform in ('darwin', ): - if int(_version) > 9: + if int(_version) >= '10e': + archive = 'android-ndk-r{0}-darwin-{1}.zip' + elif _version >= '10c': archive = 'android-ndk-r{0}-darwin-{1}.bin' else: archive = 'android-ndk-r{0}-darwin-{1}.tar.bz2' is_64 = (os.uname()[4] == 'x86_64') elif platform.startswith('linux'): - if int(_version) > 9: # if greater than 9, take it as .bin file + if _version >='10e': + archive = 'android-ndk-r{0}-linux-{1}.zip' + elif _version >= '10c': archive = 'android-ndk-r{0}-linux-{1}.bin' else: archive = 'android-ndk-r{0}-linux-{1}.tar.bz2' @@ -311,7 +322,12 @@ class TargetAndroid(Target): unpacked = 'android-ndk-r{0}' archive = archive.format(self.android_ndk_version, architecture) unpacked = unpacked.format(self.android_ndk_version) - url = 'http://dl.google.com/android/ndk/' + + if _version >= '10e': + url='https://dl.google.com/android/repository/' + else: + url = 'http://dl.google.com/android/ndk/' + self.buildozer.download(url, archive, cwd=self.buildozer.global_platform_dir) From ecc499c23a702c2b560e81a725dd2a37e387ca2a Mon Sep 17 00:00:00 2001 From: Philipp Auersperg Date: Fri, 23 Nov 2018 09:41:44 +0100 Subject: [PATCH 2/2] follow links --- buildozer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildozer/__init__.py b/buildozer/__init__.py index ea2ca94..31107cd 100644 --- a/buildozer/__init__.py +++ b/buildozer/__init__.py @@ -744,7 +744,7 @@ class Buildozer(object): rmtree(self.app_dir) - for root, dirs, files in walk(source_dir): + for root, dirs, files in walk(source_dir, followlinks=True): # avoid hidden directory if True in [x.startswith('.') for x in root.split(sep)]: continue