Buildozer OSX issues (Possibly Python2.7 related)

14 views
Skip to first unread message

Rick Kreifeldt

unread,
Jun 9, 2019, 12:15:42 PM6/9/19
to Kivy users support
I tried posting this yesterday but never saw it show up on the group - 

I was trying to learn how to package my app so I build a simple Hello World application and then tried to get Buildozer to make an OSX app.

One problem is that my actual app that has tens of thousands of lines was started a few years ago under Python 2.7, so I prefer to do this under Python 2.7

The scripts error out in four specific places. I have hacked around the errors to make my Hello World .dmg, but I am worried about this not working in for my real app.

Problems documented below:
1)In python2.7/site packages/Buildozer/targets/osx:
     def download_kivy: 
According to various documentation Buildozer should find my Kivy.app in /Applications. The default name I have when I installed Kivy 1.10.1 is "Kivy.app" however this line:
                if exists('/Applications/Kivy{}.app'.format(py_branch)):
 is going to be looking for Kivy2.app

It is possible I manually renamed Kivy2.app to Kivy.app to make it work with my debugger settings I can't remember. 

Secondly on this issue, since it failed it eventually tried downloading Kivy from your website and was never able to do it. Not sure why in the end.
 
2) In python2.7/site packages/Buildozer/targets/osx.py: 
       def build_package  has the line: 
               app_deps = open('requirements.txt').read()
     I'd expect something more like 
               app_deps = bcg('app', 'requirements')
     But I was struggling to make the code work making that change
    
Question:This seems like a holdover from previous ways buildozer worked. Looking in the android.py I see you using the info from the spec file. Can this be fixed to work from the spec file?

3) In .buildozer/applibs/client/exceptions.py
  This file fails to build due to this line:
       def __init__(self, *args, exception):
  In my editor this even shows as a syntax error. I got it to build changing it to:
       def __init__(self, exception, *args):
  Thinking about it more, it seems I should have tried to explicitly tried to make exception a 'keyword only' by something like the below:
       def __init__(self, *args, exception=''):

4) In .buildozer/applibs/client/session.py: the function name
       def exec(self, code, scope={}):
    shows as a syntax error. The problem for some reason is the word 'exec'. I'd expect given that it is a class method it should be fine, but it won't build. I arbitrarily changed it to 'exec1' and it will build, but I figure someone has to call it at some point. I wandered around the code looking a bit but couldn't find it.


Reply all
Reply to author
Forward
0 new messages