Skip to main content

Flatpak support for Panda3D

Project description

NOTE ==========================================================================

This works on Linux only.

INSTALLATION ==================================================================

pip install panda3d-flatpak

USAGE =========================================================================

In your setup.py file, add the following:

from direct.dist.commands import bdist_apps
from p3d_flatpak import FlatpakBuilder

class BDistAppsCmd(bdist_apps):
def run(self):
bdist_apps.run(self)
bld = FlatpakBuilder(
self,
'com.yourCompany.YourProject',
'/home/you/path/to/flatpak_repo',
'D43B...B5',
'/home/you/path/to/gpg',
'http://www.yourdomain.org/flatpak')
bld.build()

setup(
...
cmdclass={"bdist_apps": BDistAppsCmd},
... )

This article
(https://blogs.gnome.org/alexl/2017/02/10/maintaining-a-flatpak-repository/)
contains a section which explains how to create GPG keys for signing Flatpak
repos.

UPDATES =======================================================================

If you built a Flatpak repo, and later you modify your code and execute 'python
setup.py bdist_apps' again, your Flatpak repo will be updated. So, your users
can do their 'flatpak update' command to update your project.

EXAMPLE =======================================================================

Let's build a Flatpak repository for the Panda3D's Asteroids example.

First of all, create your GPG key (look at the article cited earlier).

Modify the file setup.py
(https://github.com/panda3d/panda3d/blob/master/samples/asteroids/setup.py)
adding these lines:

from direct.dist.commands import bdist_apps
from p3d_flatpak import FlatpakBuilder

class BDistAppsCmd(bdist_apps):
def run(self):
bdist_apps.run(self)
bld = FlatpakBuilder(
self,
'org.panda3d.Asteroids',
'/home/you/panda3d/samples/asteroids/dist/flatpak_repo',
'D43B...B5',
'/home/you/path/to/gpg',
'file:///home/you/panda3d/samples/asteroids/dist/flatpak_repo')
bld.build()

setup(
...
cmdclass={"bdist_apps": BDistAppsCmd},
... )

Then, launch the standard Panda3D build command:

python setup.py bdist_apps

At the end of the process, you will get the builds created by Panda3D, your
Flatpak repository in dist/flatpak_repo/ and a .flatpakref file in dist/.

Let's install Asteroids:
flatpak --user install file:///home/you/panda3d/samples/asteroids/dist/asteroids-stable.flatpakref

Let's run Asteroids:
flatpak run org.panda3d.Asteroids

Now, you can delete build/ and dist/, then you can rebuild it changing the URL
(from file:///... to https://...), so you can use it online (in place of
locally): just upload the repo to the path you specified and the .flatpakref
somewhere and everything should work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panda3d-flatpak-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

panda3d_flatpak-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file panda3d-flatpak-0.1.0.tar.gz.

File metadata

  • Download URL: panda3d-flatpak-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for panda3d-flatpak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56432b8d33c661f057ec1c84b8faee1b5a0c33bb83ea30e902d58363e1c43eef
MD5 f63112823f86db4a81a0d317cc017504
BLAKE2b-256 bb28aa8129ef64f2146cdc81499adeacd1f91a2316617c5bc23b14768955a31f

See more details on using hashes here.

File details

Details for the file panda3d_flatpak-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: panda3d_flatpak-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for panda3d_flatpak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 843495a207b31b08915e6ed9ce0c482f901ce5fa2043a5db3a5f318eaca50036
MD5 70d2363b6e32d2890f3a87b63c58e958
BLAKE2b-256 3b5324bf2ceaca131abe013544336c5cf5c34bb21476dc2f89ac26fbe86bff7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page