From 818e0b2825270ad20085b1bf2650c3010da03025 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Mon, 18 Apr 2016 22:07:30 -0500 Subject: [PATCH] let p4a revamp handle pure python requirements --- buildozer/__init__.py | 3 +++ buildozer/targets/android_new.py | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/buildozer/__init__.py b/buildozer/__init__.py index 5797fdb..ac18776 100644 --- a/buildozer/__init__.py +++ b/buildozer/__init__.py @@ -451,6 +451,9 @@ class Buildozer(object): ''' requirements = self.config.getlist('app', 'requirements', '') target_available_packages = self.target.get_available_packages() + if target_available_packages is True: + # target handles all packages! + return # remove all the requirements that the target can compile onlyname = lambda x: x.split('==')[0] diff --git a/buildozer/targets/android_new.py b/buildozer/targets/android_new.py index d41d9e4..571813a 100644 --- a/buildozer/targets/android_new.py +++ b/buildozer/targets/android_new.py @@ -25,20 +25,14 @@ class TargetAndroidNew(TargetAndroid): return self.buildozer.cmd(self._p4a_cmd + cmd, **kwargs) def get_available_packages(self): - available_modules = self._p4a( - "recipes --compact", - get_stdout=True)[0] - return available_modules.splitlines()[0].split() + return True def compile_platform(self): app_requirements = self.buildozer.config.getlist( 'app', 'requirements', '') - available_modules = self.get_available_packages() onlyname = lambda x: x.split('==')[0] - android_requirements = [x for x in app_requirements - if onlyname(x) in available_modules] dist_name = self.buildozer.config.get('app', 'package.name') - requirements = ','.join(android_requirements) + requirements = ','.join(app_requirements) options = [] source_dirs = {