Git Product home page Git Product logo

pyappimage's Introduction

PyAppImage PyAppImage 🐍

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

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,

environment: 
  HELLO: TEST

This will be translated to

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

data: 
  $CWD/somefile/photo.png: $APPIMAGE/photo.png
  /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

MIT License

Copyright (c) 2020 Srevin Saju

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Copyright

(c) Srevin Saju 2020

PyAppImage logo is a remix of the Papirus Icon Theme.

pyappimage's People

Contributors

srevinsaju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyappimage's Issues

3.9 - something missing

is there something missing on appimage file?

[root@aincrad a]# ls
pyappimage  pyappimage-3.8-x86_64.AppImage  setup.py                                 up.
[root@aincrad a]# ./pyappimage-3.8-x86_64.AppImage build
Warning: No icon file was provided. The default Python icon will be used. To add an icon, place a auntnee.svg or auntnee.png in pyappimage
Warning: No Appdata file provided. Please add pyappimage/auntnee.appdata.xml for desktop integration, and indexing.
fusermount detected on host system.
⠙ Building AppImage for auntneeTraceback (most recent call last):
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/bin/pyappimage", line 9, in <module>
    sys.exit(cli())
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/pyappimage/cli.py", line 211, in build
    pyappimage_build(config, appdata=appdata, icon=icon_path,
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/pyappimage/build/build.py", line 207, in build
    install_packages(setup_py=setup_py, build_directory=build_directory)
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/site-packages/pyappimage/build/build.py", line 130, in install_packages
    _pip_install_proc = subprocess.run(_(
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/tmp/.mount_pyappirn7Rmm/opt/python3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.mount_pyappirn7Rmm/opt/python3.8/bin/pip'
[root@aincrad a]# 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.