validators
lib.validators.validateVersionConstraints
Type: validateVersionConstraints :: AttrSet -> AttrSet
Validates the Python package set held by Python (python.pkgs
) against the parsed project.
Returns an attribute set where the name is the Python package derivation pname
and the value is a list of the mismatching conditions.
structured function argument
: project
: Project metadata as returned by lib.project.loadPyproject
python
: Python derivation
extras
: Python extras (optionals) to enable
::: {.example #function-library-example-lib.validators.validateVersionConstraints}
lib.validators.validateVersionConstraints
usage example
# validateVersionConstraints (lib.project.loadPyproject { ... })
{
resolvelib = {
# conditions as returned by `lib.pep440.parseVersionCond`
conditions = [ { op = ">="; version = { dev = null; epoch = 0; local = null; post = null; pre = null; release = [ 1 0 1 ]; }; } ];
# Version from Python package set
version = "0.5.5";
};
unearth = {
conditions = [ { op = ">="; version = { dev = null; epoch = 0; local = null; post = null; pre = null; release = [ 0 10 0 ]; }; } ];
version = "0.9.1";
};
}
:::