RANDOM USER PROJECTS
Angels Fall First: the Second Antarean War
Blackout: a game using high-end lighting for ambiance.
Plith, a fast-paced puzzle game

Panda3D Manual: Building Binaries

Contents

Overview

The build_apps command uses pip to fetch any binary packages (including Panda3D) as wheels that are necessary to build the applications for other platforms. In order for pip to know which wheels to fetch(including the correct panda3d wheel), a requirements file (or a Pipfile if pipenv is being used) is required. After collecting dependencies, platform-specific binaries (e.g., exe on Windows) are built for each listed application for each listed platform.

Options

The following options can be used with the build_apps command:

build_base
the directory to build the applications in (defaults to "build" in the current working directory)
gui_apps
a dictionary of applications that can open a window with executable names as keys and the path to the main/entry-point script as the value
console_apps
a dictionary of applications that do not open a window with executable names as keys and the path to the main/entry-point script as the value
include_patterns
a list of patterns of files to include in the built applications
exclude_patterns
a list of patterns of files to not include in the build application (takes precedence over include_patterns)
rename_paths
a dictionary with keys being a path to match and the value being the path to replace it with
include_modules
a dictionary with keys being an application (use '*' to denote all applications) and values being lists of Python modules to freeze into the application regardless of whether FreezeTool detects it as a dependency (useful for "hidden" imports that FreezeTool may not be able to follow)
exclude_modules
a dictionary with keys being an applications (use '*' to denote all applications) and values being lists of Python modules to not freeze into the application regardless of whether FreezeTool detects it as a dependency
platforms
a list of PEP 425 platform tags to build applications for (defaults to ['manylinux1_x86_64', 'macosx_10_6_x86_64', 'win_amd64'])
plugins
a list of dynamically loaded Panda3D plugins include with the built applications (available plugins are listed below)
requirements_paths
a path to a requirements.txt file to use with PIP when fetching wheels (defaults to ./requirements.txt)
use_optimized_wheels
if set, try to download optimized wheels using an extra index url (defaults to True)
optimized_wheel_index
the extra index url to use to find optimized wheels (Panda3D will try to set a reasonable default if this is not set)
file_handlers
a dictionary with keys matching extensions and values being functions of the form:
def func(build_cmd, srcpath, dstpath)

Default File Handlers

File handlers defined by the
file_handlers
option are added to a list of default file handlers. User-defined file handlers for an extension overrides the default file handler. The default file handlers are:
.egg
run egg2bam

Available Plugins

p3ffmpeg
adds support for additional audio, image, and video formats beyond what is built into Panda3D by default
p3openal_audio
audio (including 3D audio) support using OpenAL
p3fmod_audio
audio (including 3D audio) support using FMOD
p3ptloader
adds support for additional model formats beyond BAM
p3assimp
adds support for additional model formats beyond BAM by using Assimp
p3tinydisplay
software renderer
pandagl
OpenGL renderer
pandagles
OpenGL ES renderer
pandagles2
OpenGL ES 2 renderer
pandadx9
Direct 3D 9 renderer (Windows only)

More information about some of the libraries used by these plugins can be found here.

Optimized Builds

By default, Panda3D is built with extra debug information and code (sometimes referred to as an SDK build of Panda3D). While this extra debug information and code is very useful for developing a Panda3D application, it takes up more disk space and runs slower. To solve this, optimized wheels are available that strip out this debug information and code.

If use_optimized_wheels is set to True, then build_app will automatically try to find an optimized wheel that meets the Panda3D version requirements of the application. It does this by exposing an extra index URL to pip. Optimized wheels are versioned such that they will have higher priority than regular wheels of the same version, but will have less priority than a newer version of a regular wheel.

If PyPI or archive.panda3d.org are used as the index for the regular Panda3D wheel, then build_apps can pick an appropriate index URL for optimized wheels. Otherwise, set optimized_wheel_index to point to the index that contains the optimized wheels.