mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -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
|
||||
partitions = let
|
||||
compat = isCompatible python.pythonVersion;
|
||||
supportsPythonVersion = pkgMeta: let
|
||||
pep508Result = if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true;
|
||||
|
||||
flatDeps = (pyProject.tool.poetry.dependencies or {}) // (pyProject.tool.poetry.dev-dependencies or {});
|
||||
constraints = flatDeps.${pkgMeta.name}.python or "";
|
||||
pyprojectResult = isCompatible python.pythonVersion constraints;
|
||||
pyprojectResult = compat constraints;
|
||||
in
|
||||
pyprojectResult && pep508Result;
|
||||
in
|
||||
|
|
Loading…
Add table
Reference in a new issue