pythonPackages.linode-api: disable future/enum34 on newer python versions

This commit is contained in:
Jörg Thalheim 2017-07-23 11:23:28 +01:00
parent 2d81186045
commit 55af60a23f

View file

@ -15,11 +15,16 @@ buildPythonPackage rec {
disabled = (pythonOlder "2.7"); disabled = (pythonOlder "2.7");
buildInputs = [];
propagatedBuildInputs = [ requests ] propagatedBuildInputs = [ requests ]
++ stdenv.lib.optionals (!isPy3k) [ future ] ++ stdenv.lib.optionals (!isPy3k) [ future ]
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]; ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
postPatch = (stdenv.lib.optionalString (isPy3k) ''
sed -i -e '/"future",/d' setup.py
'') + (stdenv.lib.optionalString (!pythonOlder "3.4") ''
sed -i -e '/"enum34",/d' setup.py
'');
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1lfqsll3wv1wzn98ymmcbw0yawj8ab3mxniws6kaxf99jd4a0xp4"; sha256 = "1lfqsll3wv1wzn98ymmcbw0yawj8ab3mxniws6kaxf99jd4a0xp4";