python3Packages.pipdate: fix dependency management

This commit is contained in:
Jonathan Ringer 2020-07-04 08:03:58 -07:00
parent b19523ba23
commit 7e6e87e7eb
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0

View File

@ -1,8 +1,10 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pythonOlder
, isPy27 , isPy27
, appdirs , appdirs
, importlib-metadata
, requests , requests
, pytest , pytest
}: }:
@ -20,8 +22,16 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
appdirs appdirs
requests requests
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
]; ];
# can be removed when https://github.com/nschloe/pipdate/pull/41 gets merged
postPatch = ''
substituteInPlace setup.cfg \
--replace "importlib_metadata" "importlib_metadata; python_version < \"3.8\""
'';
checkInputs = [ checkInputs = [
pytest pytest
]; ];