Starting with 1.10, Python applications using Panda3D can be packaged in a distributable form (e.g., zip archives, Windows installers, tarballs) using Setuptools. These packages can then be hosted on a website or store front for distribution to end users. Using this new Setuptools-based process is recommended over using pdeploy/ppackage since it is simpler, does not require special builds of Panda3D (e.g., rtdist and runtime), uses standard Python tools, and works with Python 3 (there is no official Python3 rtdist).
From the Setuptools documentation, "Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects." The Setuptools documentation should be referred to for more details, but the basics of using Setuptools is:
- Create a setup.py
- Execute commands with
python setup.py command
The basic structure of a setup.py file is:
setup() function taking many arguments. See the Setuptools Examples page for example
setup.py files for common project structures.
panda3d package adds two new commands to Setuptools:
- build binaries that can be run without Python or Panda3D pre-installed on the end-user's system
- package binaries into various archives and installers for distribution (also runs
Thus, the basic steps to deploy a Panda3D application (or set of applications) is:
- Create a
setup.py file for your application
python setup.py bdist_apps
- Copy the archives/packages (e.g., zip, tar.gz, exe) from the build directory to a location that users can access