module documentation

Load setuptools configuration from ``pyproject.toml`` files. **PRIVATE MODULE**: API reserved for setuptools internal usage only.

Function apply_configuration Apply the configuration from a ``pyproject.toml`` file into an existing distribution object.
Function expand_configuration Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...) find their final values.
Function load_file Undocumented
Function read_configuration Read given configuration file and returns options from it as a dict.
Function validate Undocumented
Class _ConfigExpander Undocumented
Class _EnsurePackagesDiscovered No class docstring; 0/2 instance variable, 2/3 methods documented
Exception _BetaConfiguration Explicitly inform users that some `pyproject.toml` configuration is *beta*
Exception _InvalidFile The given `pyproject.toml` file is invalid and would be ignored. !!
Function _ignore_errors Undocumented
Function _parse_requirements_list Undocumented
Function _skip_bad_config Be temporarily forgiving with invalid ``pyproject.toml``
Type Alias _Path Undocumented
Variable _logger Undocumented
def apply_configuration(dist: Distribution, filepath: _Path, ignore_option_errors=False) -> Distribution: (source)

Apply the configuration from a ``pyproject.toml`` file into an existing distribution object.

def expand_configuration(config: dict, root_dir: Optional[_Path] = None, ignore_option_errors: bool = False, dist: Optional[Distribution] = None) -> dict: (source)

Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...) find their final values. :param dict config: Dict containing the configuration for the distribution :param str root_dir: Top-level directory for the distribution/project (the same directory where ``pyproject.toml`` is place) :param bool ignore_option_errors: see :func:`read_configuration` :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. Used in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``). :rtype: dict

def load_file(filepath: _Path) -> dict: (source)

Undocumented

def read_configuration(filepath: _Path, expand=True, ignore_option_errors=False, dist: Optional[Distribution] = None): (source)

Read given configuration file and returns options from it as a dict. :param str|unicode filepath: Path to configuration file in the ``pyproject.toml`` format. :param bool expand: Whether to expand directives and other computed values (i.e. post-process the given configuration) :param bool ignore_option_errors: Whether to silently ignore options, values of which could not be resolved (e.g. due to exceptions in directives such as file:, attr:, etc.). If False exceptions are propagated as expected. :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. This is used for auto-discovery of packages and in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded. When ``expand=False`` this object is simply ignored. :rtype: dict

def validate(config: dict, filepath: _Path) -> bool: (source)

Undocumented

@contextmanager
def _ignore_errors(ignore_option_errors: bool): (source)

Undocumented

def _parse_requirements_list(value): (source)

Undocumented

def _skip_bad_config(project_cfg: dict, setuptools_cfg: dict, dist: Optional[Distribution]) -> bool: (source)

Be temporarily forgiving with invalid ``pyproject.toml``

Undocumented

Value
Union[str, os.PathLike]

Undocumented