Global Symbols

This document lists every single global type, variable, and function available in PyOxidizer’s Starlark execution environment.

In addition to the symbols provided by PyOxidizer’s Starlark dialect, there are also the Starlark built-ins.

Global Types

PyOxidizer’s Starlark dialect defines the following custom types:

FileContent

Represents the content of a file on the filesystem.

FileManifest

Represents a mapping of filenames to file content.

PythonDistribution

Represents an implementation of Python.

Used for embedding into binaries and running Python code.

PythonEmbeddedResources

Represents resources made available to a Python interpreter.

PythonExecutable

Represents an executable file containing a Python interpreter.

PythonExtensionModule

Represents a compiled Python extension module.

PythonInterpreterConfig

Represents the configuration of a Python interpreter.

PythonPackageDistributionResource

Represents a file containing Python package distribution metadata.

PythonPackageResource

Represents a non-module resource data file.

PythonPackagingPolicy

Represents a policy controlling how Python resources are added to a binary.

PythonModuleSource

Represents a .py file containing Python source code.

Global Constants

The Starlark execution environment defines various variables in the global scope which are intended to be used as read-only constants. The following sections describe these variables.

BUILD_TARGET_TRIPLE

The string Rust target triple that we’re currently building for. Will be a value like x86_64-unknown-linux-gnu or x86_64-pc-windows-msvc. Run rustup target list to see a list of targets.

CONFIG_PATH

The string path to the configuration file currently being evaluated.

CONTEXT

Holds build context. This is an internal variable and accessing it will not provide any value.

CWD

The current working directory. Also the directory containing the active configuration file.

Global Functions

PyOxidizer’s Starlark dialect defines the following global functions:

default_python_distribution()

Obtain the default PythonDistribution for the active build configuration.

glob()

Collect files from the filesystem.

register_target()

Register a named target that can be built.

resolve_target()

Build/resolve a specific named target.

resolve_targets()

Triggers resolution of requested build targets.

set_build_path()

Set the filesystem path to use for writing files during evaluation.