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.
The following options can be used with the
The directory to build the applications in (defaults to “build” in the current working directory)
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
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
A list of patterns of files to include in the built applications
A list of patterns of files to not include in the build application (takes precedence over include_patterns)
A dictionary with keys being a path to match and the value being the path to replace it with
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)
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
A list of PEP 425 platform tags to build applications for (defaults to
['manylinux1_x86_64', 'macosx_10_6_x86_64', 'win_amd64']); other options are ‘win32’, ‘manylinux1_i686’ and ‘macosx_10_6_i686’.
A list of dynamically loaded Panda3D plugins include with the built applications (available plugins are listed below)
A path to a requirements.txt file to use with PIP when fetching wheels (defaults to ./requirements.txt)
If set, try to download optimized wheels using an extra index url (defaults to True)
The extra index url to use to find optimized wheels (Panda3D will try to set a reasonable default if this is not set)
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. By default, there is only one file handler registered: for
.egg files, which runs egg2bam.
Adds support for additional audio, image, and video formats beyond what is built into Panda3D by default
Audio (including 3D audio) support using OpenAL
Audio (including 3D audio) support using FMOD
Adds support for additional model formats beyond BAM
Adds support for additional model formats beyond BAM by using Assimp
OpenGL ES renderer
OpenGL ES 2 renderer
Direct 3D 9 renderer (Windows only)
More information about some of the libraries used by these plugins can be found here.
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.
use_optimized_wheels is set to
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
Notes on Virtual Environments¶
The build process is tested and known to work with the built-in
module, that has been part of Python since version 3.3 and with
which are the recommended environments to build.