Skip to content

Interface


ExtensionModules

__init__(name: str, root: str, metadata: dict, config: dict) -> None

Parameters:

Name Type Description Default
name str

The name used to register this extension module builder.

required
root str

The project's root directory.

required
metadata dict

The PEP 621 project metadata.

required
config dict

The raw user-defined configuration.

required

inputs() -> list[str] abstractmethod

Returns:

Type Description
list[str]

The complete list of files or directories that are targeted for generation by the generate_inputs method. These are any intermediate artifacts that are required to generate the outputs, ideally even without network access.

Each path must be relative to the project root.

outputs() -> list[str] abstractmethod

Returns:

Type Description
list[str]

The complete list of files or directories that are targeted for generation by the generate_outputs method. These are the extension modules and anything else that is required in the built distribution.

Each path must be relative to the project root.

generate_inputs(data: dict) -> None abstractmethod

This method generates the files or directories that are returned by the inputs method.

Parameters:

Name Type Description Default
data dict

Options specific to source distributions.

required

generate_outputs(data: dict) -> None abstractmethod

This method generates the files or directories that are returned by the outputs method.

Parameters:

Name Type Description Default
data dict

Options specific to built distributions.

required

get_env_option(option: str) -> str

Returns:

Type Description
str

The value of the upper-cased environment variable PY_EXTENSION_BUILDER_<builder_name>_<option>.

name() -> str property

The name used to register this extension module builder.

root() -> str property

The project's root directory.

metadata() -> dict property

The PEP 621 project metadata.

config() -> dict property

The raw user-defined configuration.

BuildRunner

__init__(root: str, metadata: dict) -> None

Parameters:

Name Type Description Default
root str

The project's root directory.

required
metadata dict

The PEP 621 project metadata.

required

inputs() -> list[str]

Returns:

Type Description
list[str]

The complete list of builder inputs.

outputs() -> list[str]

Returns:

Type Description
list[str]

The complete list of builder outputs.

generate_inputs(data: dict) -> None

Parameters:

Name Type Description Default
data dict

Options specific to source distributions.

required

generate_outputs(data: dict) -> None

Parameters:

Name Type Description Default
data dict

Options specific to built distributions.

required

Last update: June 12, 2022