项目作者: srevinsaju

项目描述 :
AppImage builder, just for python.
高级语言: Python
项目地址: git://github.com/srevinsaju/pyappimage.git
创建时间: 2020-08-20T17:12:45Z
项目社区:https://github.com/srevinsaju/pyappimage

开源协议:MIT License

下载



PyAppImage
PyAppImage :snake:


Create optimized Python AppImages, faster!



forthebadge made-with-python



Python application GitHub commit activity GitHub GitHub tag (latest SemVer) irc

Mentioned in Awesome AppImage

GitHub followers GitHub stars

Getting Started

The project is still in beta. Consider reporting bugs to help development and release a stable version;

Download pyappimage

  • Choose the Python Version. Currently, the supported Python versions are 3.6, 3.7 and 3.8.
    These AppImages are built using python-appimage which
    includes the Python Interpreter. See why not pyappimage section for more
    details. Corresponding to the python version, binaries will be built, using [PyInstaller]
    (https://github.com/PyInstaller/PyInstaller) and are processed to make the necessary changes.

  • Get the latest pyappimage.AppImage to begin development

PyAppImage tutorial

Here are some small tutorials to package some applications, and to workaround bugs when packaging software

  1. Hello World AppImage
  2. Packaging Archivy
  3. Packaging AppImageLint

Configuration parameters

pyappimage can be configured using the following parameters

entrypoint

Entrypoint is a path to the function. It is normally in the format

  1. folder.script:function

here, the function located in script file, of which the script file is
located in the folder called folder is executed.


Environment Variables

Environment variables can be set before the appimage entrypoint is called.
This can be useful in defining AppImage based variables or conditionally executing some functions when the app is being run within an appimage,

  1. environment:
  2. HELLO: TEST

This will be translated to

  1. export HELLO=TEST


Include additional data to AppImage

These are data objects, including items like png, json, txt items which you would like to place in the AppImage. Just simple add

  1. data:
  2. $CWD/somefile/photo.png: $APPIMAGE/photo.png
  3. /usr/share/icons/myphoto.svg: $APPIMAGE/icons/icon.png


Custom Icon

Place <appname>.png in the pyappimage directory, and it will be automatically set as the AppImage dir icon.


Custom Desktop File

pyappimage automatically generates the desktop file for you. If you want to override the desktop file generated by pyappimage, you can add a <appname>.desktop desktop file in the pyappimage directory, and that will be added. Make sure that your desktop file matches FreeDesktop’s standards.

When to use pyappimage ?

Use pyappimage when

  • You are creating a command line application
  • Your application has reached beta stage
  • If you have intermediate coding skills on Python
  • You are writing an Hello World Application which does not need the entire Python interpreter
  • If you are worried about the huge python appimage
  • If you are highly experienced with PyInstaller or nuitka

Do not use pyappimage when

  • If your project is still in alpha
  • If your project requirements are not properly written
  • If you do not have a setup.py
  • If you are building a Qt Application? (needs more references. PyQt pyappimage weighed 119 MB on guiscrcpy, so the difference is very tiney)

Similar projects

Awesome AppImage Python development tools provide a list of Awesome
tools to speed up distributing your python apps. Do check them out.
pyappimage-*.AppImage which you use to build your optimized Python AppImages itself use @niess ‘s python-appimage.
Because pyappimage needs a real python interpreter to bundle Python appimages for you!

License

  1. MIT License
  2. Copyright (c) 2020 Srevin Saju
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in all
  10. copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. SOFTWARE.

(c) Srevin Saju 2020

PyAppImage logo is a remix of the Papirus Icon Theme.