Skip to main content
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.

Metadata

Release files for panda3d-flatpak 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panda3d-flatpak 0.1.2
File Size Uploaded
panda3d-flatpak-0.1.2.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for panda3d-flatpak 0.1.2
File Interpreter ABI Platform
panda3d_flatpak-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / panda3d-flatpak-0.1.2.tar.gz

Download URL panda3d-flatpak-0.1.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0603de149a9e66e4037b2f09a9d2bcb9558eea47aba22b72a1563f7cb9f9fed7
BLAKE2b-256 checksum
How to use checksums
5c2fa7fbe71ca3104f5eac78f6813062c5e1cb7e601a2946d7b2a552e794852e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / panda3d_flatpak-0.1.2-py3-none-any.whl

Download URL panda3d_flatpak-0.1.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5659545f475c7b73973ef83b75304c4b10dfd08b821927fda2bbc2aa60504141
BLAKE2b-256 checksum
How to use checksums
7a7bd84f57f22c4bd8eddc14da850061adeec66ae355703217a77031f28df847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page