# HG changeset patch # User Tuomo Valkonen # Date 1537315099 18000 # Node ID 109eaddc16e1a0bda0b88ccdf7bc6b55533c5aa6 # Parent e5f29271089db588f7568676fd7c5fb2f0f14603 py2app is a waste of my life. diff -r e5f29271089d -r 109eaddc16e1 README.md --- a/README.md Tue Sep 18 18:10:03 2018 -0500 +++ b/README.md Tue Sep 18 18:58:19 2018 -0500 @@ -49,13 +49,19 @@ - [py2app](https://py2app.readthedocs.io/en/latest/install.html). -To create the standalone app +To create an app that you can launch at startup and give permanent permissions +to the keychain, use - python3 setup.py py2app + python3 setup.py py2app -A The app hould be placed under `dist/`. Copy it to your `Applications` directory, and set it up to launch on login. +If you are keen on wasting your life, you can try to run py2app without `-A` +option to create a standalone app that you can copy to computers without +Python installed, but it will probably most likely not work because py2app +is shit. Currently (2018-09-18) it is not working with the keyring package. + ## Usage and configuration diff -r e5f29271089d -r 109eaddc16e1 borgend/instance.py --- a/borgend/instance.py Tue Sep 18 18:10:03 2018 -0500 +++ b/borgend/instance.py Tue Sep 18 18:58:19 2018 -0500 @@ -81,8 +81,10 @@ if '_PY2APP_LAUNCHED_' in env: val=env['_PY2APP_LAUNCHED_'] if val=='1': - del env['PYTHONPATH'] - del env['PYTHONHOME'] + if 'PYTHONPATH' in env: + del env['PYTHONPATH'] + if 'PYTHONHOME' in env: + del env['PYTHONHOME'] self.proc=Popen(cmd, env=env, stdout=PIPE, stderr=PIPE, stdin=PIPE)