Merge pull request #92277 from jonringer/fix-pipdate

python3Packages.pipdate: fix dependency management
This commit is contained in:
Benjamin Hipple 2020-07-04 12:33:11 -04:00 committed by GitHub
commit 0eabb1b779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,10 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, isPy27
, appdirs
, importlib-metadata
, requests
, pytest
}:
@ -20,8 +22,16 @@ buildPythonPackage rec {
propagatedBuildInputs = [
appdirs
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 = [
pytest
];