py2app is a waste of my life.

Tue, 18 Sep 2018 18:58:19 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 18 Sep 2018 18:58:19 -0500
changeset 120
109eaddc16e1
parent 119
e5f29271089d
child 121
1279af7591f0

py2app is a waste of my life.

README.md file | annotate | diff | comparison | revisions
borgend/instance.py file | annotate | diff | comparison | revisions
--- 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
 
--- 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)
 

mercurial