Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildozer fails for OSX #46

Open
kcrossen opened this issue Mar 11, 2019 · 1 comment
Open

buildozer fails for OSX #46

kcrossen opened this issue Mar 11, 2019 · 1 comment

Comments

@kcrossen
Copy link

Versions

  • Python: 2.7.16
  • OS:10.11.6
  • Kivy:Kivy-1.10.1_osx10.13.5_builtin_python2_r1.dmg but 1.9.1 fails identically
  • Kivy installation method:download dmg, install as per instructions

Description

Source code can be found: https://github.com/kcrossen/CloudWatch_Remote_Monitor
The purpose is to monitor AWS resources safely through a "keyhole" access. Off-the-shelf methods are too powerful to be safe.

// Using the buildozer method as instructed

Code and Logs

package_app.py (as delivered) from line 232:
if __name__ == '__main__':
    arguments = docopt(__doc__, version='package app {}'.format(__version__))
    print(arguments)
    main(arguments)
    
In script fails:
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['python', 'package_app.py', '/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/app', '--appname=CWRemote', '--bundlename=CW_Remote', '--bundleid=com.techview', '--bundleversion=0.1', '--displayname=CW_Remote', '--author=KCrossen']' returned non-zero exit status 1

In debugger fails (exception):
Copy Kivy.app/source.app if it exists
source app {} doesn't exist


package_app.py (as modified) from line 232:
if __name__ == '__main__':
    arguments = docopt(__doc__, version='package app {}'.format(__version__))
    print(arguments)
    script_path = os.path.dirname(os.path.realpath(__file__))
    os.chdir(script_path)
    main(arguments)

In debugger fails:
Traceback (most recent call last):
  File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 237, in <module>
    main(arguments)
  File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 224, in main
    compile_app(appname)
  File "/Users/Ken/Documents/PyCharm_Projects/CW_Remote_Package/.buildozer/osx/platform/kivy-sdk-packager-master/osx/package_app.py", line 159, in compile_app
    shell=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['CWRemote.app/Contents/Resources/script -OO -m compileall CWRemote.app/Contents/Resources/myapp']' returned non-zero exit status 1
@tito tito transferred this issue from kivy/kivy Mar 11, 2019
@kcrossen
Copy link
Author

Let me start by saying you have a very fine GUI SDK, a lightweight Qt (which to me is the platinum standard). I'd experimented w/ JavaFX which turned out to be a dead end for many reasons.

By trying various workarounds, most documented in other issues, I have managed to get my app packaged for OSX. I'd be happy to lay out my process for you. It is admittedly quite crude compared to your documented process, but it has the virtue of working under challenging conditions. The central breakthrough was figuring out how to pip the dependencies after MakeSymlinks had failed, and all of the versions I tried failed from the dmg. In short,

$ kivy
-bash: kivy: command not found

then your instructions didn't apply, couldn't set up drag/drop script execute for example.

Second breakthrough is that your packaging scripts refer to:

/Applications/Kivy.app

while the dmg installs:

/Applications/Kivy2.app

And there were some others of a similar nature, documented in other issues. It looked as though nobody had tested the instructions lately, especially what would happen if one of the steps failed.

The app sources can be found here:
https://github.com/kcrossen/CloudWatch_Remote_Monitor

I have documented the process of AWS identity setup and I'll probably document my crude, brute force, installation and packaging instructions. You have a good tool and more people will use it at lower frustration levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant