mk-poetry-dep: Add pep508 evaluation to dependency selection

Poetry 1.1.0 changed the marker format in https://github.com/python-poetry/poetry/pull/2361
This commit is contained in:
adisbladis 2020-10-01 15:57:14 +02:00
parent 1bebfa70f8
commit 99cdaa7cca
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
2 changed files with 4 additions and 2 deletions

View file

@ -106,7 +106,7 @@ lib.makeScope pkgs.newScope (self: {
in
{
mkPoetryDep = self.callPackage ./mk-poetry-dep.nix {
inherit pkgs lib python poetryLib;
inherit pkgs lib python poetryLib evalPep508;
};
poetry = if __isBootstrap then null else poetryPkg;
# The canonical name is setuptools-scm

View file

@ -4,6 +4,7 @@
, python
, buildPythonPackage
, poetryLib
, evalPep508
}:
{ name
, version
@ -126,8 +127,9 @@ pythonPackages.callPackage
n: v:
let
constraints = v.python or "";
pep508Markers = v.markers or "";
in
compat constraints
compat constraints && evalPep508 pep508Markers
)
dependencies
);