github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

clouddotme / esky

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (6)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (6)
    • v0.3.0
    • v0.2.1
    • v0.2.0
    • v0.1.2
    • v0.1.1
    • v0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

an auto-update framework for frozen python apps — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

adding ChangeLog 
rfk (author)
Mon Feb 08 00:51:17 -0800 2010
commit  9374f7b61db3099d6af75b6a7b9e323587cca5f2
tree    8184eef48979f8053adb2e417952ba6c3136c3fd
parent  1126ef9f2a64348bff64cd8114626faa5a321ad6
esky /
name age
history
message
file ChangeLog.txt Mon Feb 08 00:51:17 -0800 2010 adding ChangeLog [rfk]
file LICENSE.txt Tue Nov 03 05:40:58 -0800 2009 add BSD License and copyright slugs [rfk]
file MANIFEST.in Mon Feb 08 00:51:09 -0800 2010 small doc cleanups [rfk]
file README.txt Mon Feb 08 00:48:53 -0800 2010 add preliminary support for py2exe [rfk]
file TODO.txt Mon Feb 08 00:51:09 -0800 2010 small doc cleanups [rfk]
directory esky/ Mon Feb 08 00:50:44 -0800 2010 test correct bundling of MSVCRT [rfk]
file setup.py Sun Feb 07 20:10:15 -0800 2010 refactored in preparation for adding py2exe sup... [rfk]
README.txt

  esky:  keep frozen apps fresh

Esky is an auto-update framework for frozen Python applications.  It provides
a simple API through which apps can find, fetch and install updates, and a
bootstrapping mechanism that keeps the app safe in the face of failed or
partial updates.

Esky is currently capable of freezing apps with bbfreeze or py2exe. Adding
support for other freezer programs should be straightforward; patches will be
gratefully accepted.

The main interface is the 'Esky' class, which represents a frozen app.  An Esky
must be given the path to the top-level directory of the frozen app, and a
'VersionFinder' object that it will use to search for updates.  Typical usage
for an app automatically updating itself would look something like this:

    if hasattr(sys,"frozen"):
        app = esky.Esky(sys.executable,"http://example.com/downloads/")
        new_version = app.find_update()
        if new_version is not None:
            app.install_update(new_version)

A simple default VersionFinder is provided that hits a specified URL to get
a list of available versions.  More sophisticated implementations will likely
be added in the future, and you're encouraged to develop a custom VersionFinder
subclass to meet your specific needs.

When properly installed, the on-disk layout of an app managed by esky looks
like this:

    prog.exe                 - esky bootstrapping executable
    updates/                 - work area for fetching/unpacking updates
    appname-X.Y.platform/    - specific version of the application
        prog.exe             - executable(s) as produced by freezer module
        library.zip          - pure-python frozen modules
        pythonXY.dll         - python DLL
        esky-bootstrap.txt   - list of files expected in the bootstrapping env
        ...other deps...

The "appname-X.Y" directory is simply a frozen app directory with some extra
bootstrapping information produced by esky.  To freeze your app in such a
format, there is a "bdist_esky" command that can be used with a standard
distutils setup.py file; see the docstring for esky.bdist_esky for details.

To upgrade to a new version "appname-X.Z", esky performs the following steps:
    * extract it into a temporary directory under "updates"
    * move all bootstrapping files into "appname-X.Z.platm/esky-bootstrap"
    * atomically rename it into the main directory as "appname-X.Z.platform"
    * move contents of "appname-X.Z.platform/esky-bootstrap" into the main dir
    * remove the "appname-X.Z.platform/esky-bootstrap" directory
    * remove files not in "appname-X.Z.platform/esky-bootstrap.txt"
    * remove the "appname-X.Y.platform" directory

Where such facilities are provided by the operating system, this process is
performed within a filesystem transaction.  Neverthless, the esky bootstrapping
executable is able to detect and recover from a failed update should such an
unfortunate situation arise.

To clean up after failed or partial updates, applications should periodically
call the "cleanup" method on their esky.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server