Skip to content

Commit

Permalink
Merge pull request #320 from kived/android_new-pip
Browse files Browse the repository at this point in the history
let p4a revamp handle pure python requirements
  • Loading branch information
kived committed May 8, 2016
2 parents d560bef + 818e0b2 commit 0af7976
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions buildozer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ def check_application_requirements(self):
'''
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]
Expand Down
10 changes: 2 additions & 8 deletions buildozer/targets/android_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@ def _p4a(self, cmd, **kwargs):
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 = {
Expand Down

0 comments on commit 0af7976

Please sign in to comment.