Public API

Classes:

PthWheelBuilder(project_dir, config[, …])

Builds wheel binary distributions using metadata read from pyproject.toml.

WheyPthParser()

Parser for the [tool.whey-pth] table from pyproject.toml.

class PthWheelBuilder(project_dir, config, build_dir=None, out_dir=None, *args, verbose=False, colour=None, **kwargs)[source]

Bases: WheelBuilder

Builds wheel binary distributions using metadata read from pyproject.toml.

This builder has added support for creating .pth files.

Parameters
  • project_dir (PathPlus) – The project to build the distribution for.

  • build_dir (Union[str, Path, PathLike, None]) – The (temporary) build directory. Default <project_dir>/build/wheel.

  • out_dir (Union[str, Path, PathLike, None]) – The output directory. Default <project_dir>/dist.

  • verbose (bool) – Enable verbose output. Default False.

Methods:

write_pth_files()

Write .pth files, and their associated files, into the build directory.

write_pth_files()[source]

Write .pth files, and their associated files, into the build directory.

class WheyPthParser[source]

Bases: AbstractConfigParser

Parser for the [tool.whey-pth] table from pyproject.toml.

Methods:

parse(config[, set_defaults])

Parse the TOML configuration.

parse_additional_wheel_files(config)

Parse the additional-wheel-files key.

parse_name(config)

Parse the name key, giving the desired name of the .pth file.

parse_pth_content(config)

Parse the pth-content key, giving the content of the .pth file.

parse(config, set_defaults=False)[source]

Parse the TOML configuration.

Parameters
Return type

Dict[str, Any]

parse_additional_wheel_files(config)[source]

Parse the additional-wheel-files key.

The value is a list of MANIFEST.in-style entries for additional files to include in the wheel.

Parameters

config (Dict[str, Any]) – The unparsed TOML config for the [tool.whey-pth] table.

Return type

List[AdditionalFilesEntry]

parse_name(config)[source]

Parse the name key, giving the desired name of the .pth file.

Parameters

config (Dict[str, Any]) – The unparsed TOML config for the [tool.whey-pth] table.

Return type

str

parse_pth_content(config)[source]

Parse the pth-content key, giving the content of the .pth file.

Parameters

config (Dict[str, Any]) – The unparsed TOML config for the [tool.whey-pth] table.

Return type

str