python37Packages.poetry-core: fix build for python<=3.7

This commit is contained in:
Jonathan Ringer 2021-04-21 11:22:49 -07:00 committed by Jonathan Ringer
parent 38987c05ef
commit 8b2d889aeb

View file

@ -23,6 +23,13 @@ buildPythonPackage rec {
sha256 = "07x0zagf9cfr7g3132jjd5byywkbnzpfbxjfjzpzpj70fqw70qrc";
};
postPatch = lib.optionalString (pythonOlder "3.8") ''
# remove >1.0.3
substituteInPlace pyproject.toml \
--replace 'importlib-metadata = {version = "^1.7.0", python = "~2.7 || >=3.5, <3.8"}' \
'importlib-metadata = {version = ">=1.7.0", python = "~2.7 || >=3.5, <3.8"}'
'';
nativeBuildInputs = [
intreehooks
];