Hi guys. I have been working with wxPython for almost two years, and I just shipped a product using it. Although I love wxPython, serving new updates in this almost legacy format is a pain. I use esky right now to do that, but to be honest its not that great. You have to manage multiple set-up files, plus the annoying UAC thing and then keeping a separate zip on an FTP on a server.
Instead of updating compiling code, why not just teach a base program to just fetch up the latest version from a repo or something and just run that. I am not talking about changing “core” wxPython but just adding this functionality over it.
It would be far better to create Wheel format files for extensions, as
the Phoenix project, (ProjectPhoenix - wxPyWiki), does
for wxPython itself see Index of /Phoenix/snapshot-builds
for snapshots, then you can distribute your libraries, with pre-compiled
extensions for specific platforms if required. This is the whole point
of the wheel format - pure python libraries can be distributed as a
single file but libraries that have platform dependencies are multiple
files and pip knows how to select between them. (See POP 427 PEP 427 – The Wheel Binary Package Format 1.0 | peps.python.org for details on the wheel format)
···
On 29/11/2016 12:57, sebastian lópez wrote:
Hi
I think your aproach could have some security isues, also actually is
posible to create egg packages and your app should load them
>
fori inrange(10):
>
in order to update the egg files you could use something as this:
>
import re
import urllib2
import wx
......
# sei_glob is a kind of container
def checkPlugins():
# URL to download the file
url = sei_glob.UPDATE_URL
content = urllib2.urlopen(url).read()
result = re.findall(r'href="(\S+).egg', content)
modulos2download = dict()
for res in result:
nombre, version, pythonVersion = res.split('/')[-1].split('-')[:3]
modulos2download[nombre] = {'version':version,
'url':res+'.egg','pyver':pythonVersion}
path2saveModule = os.path.join(sei_glob.installDir, 'plugins')
udpatedModulesList = ''
updated = False
for moduleName, data in modulos2download.items():
try:
if sei_glob.ModulosVersiones[moduleName] < data['version']:
# download the file
self.downloadFile(data['url'], path2saveModule)
udpatedModulesList += moduleName + ' V '+
data['version']+ '\n'
updated = True
except KeyError:
downloadFile(data['url'], path2saveModule)
if updated:
wx.MessageBox('Next modules were
updated:\n\n'+udpatedModulesList+'\n\nRestart the app',
caption=sei_glob.PROG_NAME,
style=wx.OK|wx.ICON_INFORMATION)
def downloadFile(url, path2Store):
posiblePath = urllib2.urlparse.urlsplit(url).path
local_filename = posiblePath.split('/')[-1]
r = requests.get(url)
f = open(os.path.join(path2Store, local_filename), 'wb')
for chunk in r.iter_content(chunk_size=70*1024): # 75kb at a time
if chunk: # filter out keep-alive new chunks
f.write(chunk)
f.close()
>
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
I would love to see a wxPython wiki page discussing the pros and cons of various approaches for auto-updating wxPython applications. I too have tried the method of grabbing wxPython code from a URL as a proof of concept. But to get it working nicely and securely in production requires a bit more thought. A wiki page could include approaches such as this: https://github.com/phfaist/updater4pyi/
The security implications need some thought. Maybe the first time the application runs, the user could be asked whether they trust the certificate of the HTTPS site the updates are coming from? And if it’s a GitHub repo, all repo owners should have two-factor authentication turned on. But the binary wheel approach sounds better. Maybe your Continuous Integration workflow can automatically build binary wheels each time you commit? But for building and distributing binaries, do you trust your Continuous Integration service with your code-signing certificate, or do you want to distribute unsigned binaries?
Maybe automatic updates could only be done for minor version increments e.g. from v1.5.1 to v1.5.2, but for v1.6, the user would be told that the application needs to restart, so that dependencies can be reinstalled as necessary and reimported after the application restarts. It would be nice to be able to update dependencies quickly to patch a security issue, so maybe the application restart workflow could also be used for critical security updates as well as major version updates.
I recently bought the book “wxPython Application Development Cookbook”
As of wxPython 2.9, there’s an extension module that provides a mixin class called SoftwareUpdate, which integrates the update features of the Esky auto-update framework into a wxPython application.
I have to be honest that I haven’t worked with it yet.
I hope it helps you.
···
On Tuesday, November 29, 2016 at 9:42:59 AM UTC+1, Wasi Khan wrote:
Hi guys. I have been working with wxPython for almost two years, and I just shipped a product using it. Although I love wxPython, serving new updates in this almost legacy format is a pain. I use esky right now to do that, but to be honest its not that great. You have to manage multiple set-up files, plus the annoying UAC thing and then keeping a separate zip on an FTP on a server.
Instead of updating compiling code, why not just teach a base program to just fetch up the latest version from a repo or something and just run that. I am not talking about changing “core” wxPython but just adding this functionality over it.
It would be fun to write up something that uses wheels though.
Mike
···
On Sunday, December 4, 2016 at 9:57:27 AM UTC-6, Blue Flash wrote:
I recently bought the book “wxPython Application Development Cookbook”
As of wxPython 2.9, there’s an extension module that provides a mixin class called SoftwareUpdate, which integrates the update features of the Esky auto-update framework into a wxPython application.
I have to be honest that I haven’t worked with it yet.
I think we’re hijacking Wasi’s email thread a bit - he was talking more about having an always up-to-date application like a Javascript webpage.
But I’m interested in the other approach too. My biggest concern with approaches based on Esky is that they seem to use py2exe on Windows, whereas I have switched to PyInstaller because I had issues with using code signing certificates with py2exe. Also, the Python 2.7.x compatible version of py2exe hasn’t been actively maintained for a while. https://pypi.python.org/pypi/py2exe/ says: py2exe for Python 2 is still available at http://sourceforge.net/project/showfiles.php?group_id=15583 but the latest build on SourceForge seems to be from 2008-11-16.
If we use something like InnoSetup (http://www.jrsoftware.org/isinfo.php) to distribute our applications, then maybe we can just sign the setup.exe created by InnoSetup, not the Application.exe created by py2exe?
So, given that I would love have software update support on Windows, is it worth switching back from PyInstaller to py2exe? Using the py2exe for Python 2 which hasn’t been updated since 2008 frightens me, but migrating my wxPython application from Python 2.7 to Python 3 (to use the latest py2exe) frightens me too!
Just for the record, py2exe does support Python 3 - py2exe · PyPI although the Python 2 version
does seem to be dead.
But yes, it would be nice if Esky supported other packages like
PyInstaller, bbfreeze or the like.
- Mike
···
On Mon, Dec 5, 2016 at 3:35 PM, James Wettenhall < james.wettenhall@monash.edu> wrote:
Hi,
I think we're hijacking Wasi's email thread a bit - he was talking more
about having an always up-to-date application like a Javascript webpage.
But I'm interested in the other approach too. My biggest concern with
approaches based on Esky is that they seem to use py2exe on Windows,
whereas I have switched to PyInstaller because I had issues with using code
signing certificates with py2exe. Also, the Python 2.7.x compatible
version of py2exe hasn't been actively maintained for a while. py2exe · PyPI says: py2exe for Python 2 is still
available at http://sourceforge.net/project/showfiles.php?group_id=15583 but
the latest build on SourceForge seems to be from 2008-11-16.
There's a GitHub Issue for adding PyInstaller support to Esky: Support for Pyinstaller · Issue #18 · cloudmatrix/esky · GitHub which has been open
since Sep 28, 2012.
Towards the end of the Issue comments (early 2015), people seem to be
giving up on the idea of PyInstaller support in Esky, and looking at: updater4pyi · PyPI
In that GitHub Issue thread, there's a link to an attempt to describe how
to make code signing work with py2exe: https://github.com/
rfk/www.rfk.id.au/blob/master/content/blog/entry/code-
signing-py2exe/index.html but then there is a comment saying: *Aha, yep,
I had forgotten about this bug that prevents the scheme I described above
from working:* Issue 5950: Make zipimport work with zipfile containing comments - Python tracker
If we use something like InnoSetup (Inno Setup)
to distribute our applications, then maybe we can just sign the setup.exe
created by InnoSetup, not the Application.exe created by py2exe?
So, given that I would love have software update support on Windows, is it
worth switching back from PyInstaller to py2exe? Using the py2exe for
Python 2 which hasn't been updated since 2008 frightens me, but migrating
my wxPython application from Python 2.7 to Python 3 (to use the latest
py2exe) frightens me too!
James, you mentioned that you’ve tried the approach of updating apps via HTTP. Do you some have some code?
Also, I used PyInstaller to package my app too but switched only due to Esky. I really don’t think they’re concerned about adding pyinstaller though.
···
On Tuesday, 6 December 2016 02:35:40 UTC+5, James Wettenhall wrote:
Hi,
I think we’re hijacking Wasi’s email thread a bit - he was talking more about having an always up-to-date application like a Javascript webpage.
But I’m interested in the other approach too. My biggest concern with approaches based on Esky is that they seem to use py2exe on Windows, whereas I have switched to PyInstaller because I had issues with using code signing certificates with py2exe. Also, the Python 2.7.x compatible version of py2exe hasn’t been actively maintained for a while. https://pypi.python.org/pypi/py2exe/ says: py2exe for Python 2 is still available at http://sourceforge.net/project/showfiles.php?group_id=15583 but the latest build on SourceForge seems to be from 2008-11-16.
If we use something like InnoSetup (http://www.jrsoftware.org/isinfo.php) to distribute our applications, then maybe we can just sign the setup.exe created by InnoSetup, not the Application.exe created by py2exe?
So, given that I would love have software update support on Windows, is it worth switching back from PyInstaller to py2exe? Using the py2exe for Python 2 which hasn’t been updated since 2008 frightens me, but migrating my wxPython application from Python 2.7 to Python 3 (to use the latest py2exe) frightens me too!
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
I am needing to update my application on windows and could use a little help. Could you provide a tutorial/guide with reference to free Amazon Server or with AWS S3? I noticed you used an example site, but I’m struggling to get it working as it keeps giving me: [ERROR] Missing PYU_AWS_ID
Would be happy to compensate if not motivated.
Thanks
···
On Sunday, January 15, 2017 at 4:08:24 PM UTC+10, James Wettenhall wrote:
Hi,
I noticed a message in Esky’s GitHub README from August 2016 saying:
“Esky, is again unmaintained. I would reccomend trying pyinstaller and pyupdater It seems to be the king.”
So I have been trying out PyUpdater with wxPython here:
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
Hi Tyson,
Which updating framekwork are you using? As far as using Amazon Server I think you can use any kind of server to host your app I believe: all you need to is to hit a url.
I am needing to update my application on windows and could use a little help. Could you provide a tutorial/guide with reference to free Amazon Server or with AWS S3? I noticed you used an example site, but I’m struggling to get it working as it keeps giving me: [ERROR] Missing PYU_AWS_ID
Would be happy to compensate if not motivated.
Thanks
On Sunday, January 15, 2017 at 4:08:24 PM UTC+10, James Wettenhall wrote:
Hi,
I noticed a message in Esky’s GitHub README from August 2016 saying:
“Esky, is again unmaintained. I would reccomend trying pyinstaller and pyupdater It seems to be the king.”
So I have been trying out PyUpdater with wxPython here:
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
Feedback and contributions are most welcome!
Cheers,
James
Sent from my iPhone
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
I created an EXE file using pyinstaller. I’m looking for a method to auto update the app. I’m currently using python 3.6 and pyqt5 . please suggest.
···
On Sunday, 26 November 2017 01:13:01 UTC+5:30, Wasi Khan wrote:
Hi Tyson,
Which updating framekwork are you using? As far as using Amazon Server I think you can use any kind of server to host your app I believe: all you need to is to hit a url.
Wasi
On Sat, Nov 25, 2017 at 4:37 PM, Tyson Doggerz tyson...@gmail.com wrote:
Hi there :),
Awesome guide by the way.
I am needing to update my application on windows and could use a little help. Could you provide a tutorial/guide with reference to free Amazon Server or with AWS S3? I noticed you used an example site, but I’m struggling to get it working as it keeps giving me: [ERROR] Missing PYU_AWS_ID
Would be happy to compensate if not motivated.
Thanks
On Sunday, January 15, 2017 at 4:08:24 PM UTC+10, James Wettenhall wrote:
Hi,
I noticed a message in Esky’s GitHub README from August 2016 saying:
“Esky, is again unmaintained. I would reccomend trying pyinstaller and pyupdater It seems to be the king.”
So I have been trying out PyUpdater with wxPython here:
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
Feedback and contributions are most welcome!
Cheers,
James
Sent from my iPhone
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
I created an EXE file using pyinstaller. I’m looking for a method to auto update the app. I’m currently using python 3.6 and pyqt5 . please suggest.
On Sunday, 26 November 2017 01:13:01 UTC+5:30, Wasi Khan wrote:
Hi Tyson,
Which updating framekwork are you using? As far as using Amazon Server I think you can use any kind of server to host your app I believe: all you need to is to hit a url.
Wasi
On Sat, Nov 25, 2017 at 4:37 PM, Tyson Doggerz tyson...@gmail.com wrote:
Hi there :),
Awesome guide by the way.
I am needing to update my application on windows and could use a little help. Could you provide a tutorial/guide with reference to free Amazon Server or with AWS S3? I noticed you used an example site, but I’m struggling to get it working as it keeps giving me: [ERROR] Missing PYU_AWS_ID
Would be happy to compensate if not motivated.
Thanks
On Sunday, January 15, 2017 at 4:08:24 PM UTC+10, James Wettenhall wrote:
Hi,
I noticed a message in Esky’s GitHub README from August 2016 saying:
“Esky, is again unmaintained. I would reccomend trying pyinstaller and pyupdater It seems to be the king.”
So I have been trying out PyUpdater with wxPython here:
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
Feedback and contributions are most welcome!
Cheers,
James
Sent from my iPhone
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
I created an EXE file using pyinstaller. I’m looking for a method to auto update the app. I’m currently using python 3.6 and pyqt5 . please suggest.
On Sunday, 26 November 2017 01:13:01 UTC+5:30, Wasi Khan wrote:
Hi Tyson,
Which updating framekwork are you using? As far as using Amazon Server I think you can use any kind of server to host your app I believe: all you need to is to hit a url.
Wasi
On Sat, Nov 25, 2017 at 4:37 PM, Tyson Doggerz tyson...@gmail.com wrote:
Hi there :),
Awesome guide by the way.
I am needing to update my application on windows and could use a little help. Could you provide a tutorial/guide with reference to free Amazon Server or with AWS S3? I noticed you used an example site, but I’m struggling to get it working as it keeps giving me: [ERROR] Missing PYU_AWS_ID
Would be happy to compensate if not motivated.
Thanks
On Sunday, January 15, 2017 at 4:08:24 PM UTC+10, James Wettenhall wrote:
Hi,
I noticed a message in Esky’s GitHub README from August 2016 saying:
“Esky, is again unmaintained. I would reccomend trying pyinstaller and pyupdater It seems to be the king.”
So I have been trying out PyUpdater with wxPython here:
PyUpdater uses PyInstaller which I prefer over py2exe.
There’s a lot more that PyUpdater can do than what I have included in the demo, e.g. updating bundled assets. See: http://www.pyupdater.org/
It only supports PyInstaller’s --onefile mode currently, not --onedir.
The demo I’ve put together doesn’t include a GUI for telling the user that a new version is available. It’s just a trivial wxPython app which can check for and apply updates before beginning the wxPython main loop.
Feedback and contributions are most welcome!
Cheers,
James
Sent from my iPhone
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.