kiwi0fruit / pyappshare

Cookbook for creating cross-platform desktop python applications in a moment. With shortcuts supporting virtual and Anaconda environments via https://github.com/kiwi0fruit/shortcutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyAppShare

PyAppShare is a cookbook for creating cross-platform desktop python applications in a moment: with shortcuts and info how to make sure Qt GUI is LGPL. It suggests end-user to install Miniconda and all you left to do is:

  • Specify conda environment like in a setup/env/def.yml file by putting there all dependencies for your app (additional OS'es and pre/post scripts see in setup/env),
  • Wrap your app as a python module (for example "app") using predefined template app/setup.py. You can also add dependencies there but it's redundant if you do not plan to distribute the module separately. Create additional exec entry point (for example "app-ready") using predefined template app/ready.py that creates shortcuts and performs any additional user data manipulations after installation.
  • Write installation instructions for the end-user using predefined template setup/README.md,
  • Pack the whole setup folder (with *.yml env, python modules, README.md, etc.) to zip archive and send to the end-user: rough and ready but accessible and easy. See example in setup/ dir.

Examples

  • Simple template_app,
  • More advanced Enaml video application.
  • NEW: see example of how to build conda noarch package here (meta.yaml, build) that is based on the default conda-forge template.
  • NEW: see example how to use pyappshare to maintain conda evironment here. This will automatically install conda environment by specification (env yaml spec + post install bash script), register activated jupyter kernel and update the environment when install script is run again (via properly deleting the environment then creating it again).

Features

  • The templates setup.py files already have:
    • Cross-platform app shortcuts creation via shortcutter module for running the app and managing Miniconda installation. Shortcuts activate Miniconda environment (app in case of env/def.yml) and launch the application (shortcuts activate environment independent of whether Miniconda was added to the PATH or not),
    • Sample code of PyQt stopper-debugger that helps to fix GPL licensing issues was added to the app.py. Actually these license issues are not that obvious...
  • The template setup/README.md has install instructions for all platforms. Including how to:
    • Install Visual Studio compiler (for modules that need compiling and are not in conda defaults and conda-forge repos) - needed only if the app developer is lazy,
    • Install Git (for installing modules from GitHub) - needed only if the app developer is lazy,
    • Install Miniconda,
    • Run install script.

Alternatives and automatic user-side install

The proposed user-side algorithm can be automated like in Miniconda-Install but I see no point in complicating things.

There are alternative implementations of app distribution elevating Conda ecosystem:

May be these projects would suit your needs better.

About

Cookbook for creating cross-platform desktop python applications in a moment. With shortcuts supporting virtual and Anaconda environments via https://github.com/kiwi0fruit/shortcutter

License:MIT License


Languages

Language:Shell 64.2%Language:Python 35.6%Language:Batchfile 0.1%