pep621
lib.pep621.parseDependencies
Type: parseDependencies :: AttrSet -> AttrSet
Parse dependencies from pyproject.toml.
structured function argument
: pyproject
: Function argument
extrasAttrPaths
: Function argument
extrasListPaths
: Function argument
groupsAttrPaths
: Function argument
groupsListPaths
: Function argument
::: {.example #function-library-example-lib.pep621.parseDependencies}
lib.pep621.parseDependencies
usage example
# parseDependencies {
#
# pyproject = (lib.importTOML ./pyproject.toml);
# # Don't just look at `project.optional-dependencies` for groups, also look at these:
# extrasAttrPaths = [ "tool.pdm.dev-dependencies" ];
# }
{
dependencies = [ ]; # List of parsed PEP-508 strings (lib.pep508.parseString)
extras = {
dev = [ ]; # List of parsed PEP-508 strings (lib.pep508.parseString)
};
build-systems = [ ]; # PEP-518 build-systems (List of parsed PEP-508 strings)
}
:::
lib.pep621.parseRequiresPython
Type: parseRequiresPython :: AttrSet -> list
Parse project.python-requires from pyproject.toml
pyproject
: Function argument
::: {.example #function-library-example-lib.pep621.parseRequiresPython}
lib.pep621.parseRequiresPython
usage example
# parseRequiresPython (lib.importTOML ./pyproject.toml)
[ ] # List of conditions as returned by `lib.pep440.parseVersionCond`
:::
lib.pep621.filterDependenciesByEnviron
Type: filterDependenciesByEnviron :: AttrSet -> AttrSet -> AttrSet
Filter dependencies not relevant for this environment.
environ
: Environ as created by lib.pep508.mkEnviron
.
extras
: Extras as a list of strings
dependencies
: Dependencies as parsed by lib.pep621.parseDependencies
.
::: {.example #function-library-example-lib.pep621.filterDependenciesByEnviron}
lib.pep621.filterDependenciesByEnviron
usage example
# filterDependenciesByEnviron (lib.pep508.mkEnviron pkgs.python3) (lib.pep621.parseDependencies (lib.importTOML ./pyproject.toml))
{ } # Structure omitted in docs
:::