Skip to content

Commit

Permalink
mk-poetry-dep: Add pep508 evaluation to dependency selection
Browse files Browse the repository at this point in the history
Poetry 1.1.0 changed the marker format in python-poetry/poetry#2361
  • Loading branch information
adisbladis committed Oct 1, 2020
1 parent f3a057d commit 7a6f7f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion mk-poetry-dep.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, python
, buildPythonPackage
, poetryLib
, evalPep508
}:
{ name
, version
Expand Down Expand Up @@ -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
);
Expand Down

0 comments on commit 7a6f7f0

Please sign in to comment.