mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 17:21:39 -05:00
Slightly improve evaluation performance
This commit is contained in:
parent
35d38a1b11
commit
5d902c8bab
1 changed files with 2 additions and 1 deletions
|
@ -52,12 +52,13 @@ let
|
||||||
|
|
||||||
# Filter packages by their PEP508 markers & pyproject interpreter version
|
# Filter packages by their PEP508 markers & pyproject interpreter version
|
||||||
partitions = let
|
partitions = let
|
||||||
|
compat = isCompatible python.pythonVersion;
|
||||||
supportsPythonVersion = pkgMeta: let
|
supportsPythonVersion = pkgMeta: let
|
||||||
pep508Result = if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true;
|
pep508Result = if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true;
|
||||||
|
|
||||||
flatDeps = (pyProject.tool.poetry.dependencies or {}) // (pyProject.tool.poetry.dev-dependencies or {});
|
flatDeps = (pyProject.tool.poetry.dependencies or {}) // (pyProject.tool.poetry.dev-dependencies or {});
|
||||||
constraints = flatDeps.${pkgMeta.name}.python or "";
|
constraints = flatDeps.${pkgMeta.name}.python or "";
|
||||||
pyprojectResult = isCompatible python.pythonVersion constraints;
|
pyprojectResult = compat constraints;
|
||||||
in
|
in
|
||||||
pyprojectResult && pep508Result;
|
pyprojectResult && pep508Result;
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Reference in a new issue