2017-07-21 15:22:15 +02:00
|
|
|
{ stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy3k,
|
|
|
|
pythonOlder,
|
|
|
|
lib,
|
|
|
|
requests,
|
|
|
|
future,
|
|
|
|
enum34 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "linode-api";
|
2017-07-24 13:21:08 +02:00
|
|
|
version = "4.1.1b2"; # NOTE: this is a beta, and the API may change in future versions.
|
2017-07-21 15:22:15 +02:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
disabled = (pythonOlder "2.7");
|
|
|
|
|
2017-07-24 12:42:49 +02:00
|
|
|
propagatedBuildInputs = [ requests future ]
|
2017-07-21 15:22:15 +02:00
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
|
|
|
|
|
2017-07-24 12:42:49 +02:00
|
|
|
postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") ''
|
2017-07-23 12:23:28 +02:00
|
|
|
sed -i -e '/"enum34",/d' setup.py
|
|
|
|
'');
|
|
|
|
|
2017-07-24 13:21:08 +02:00
|
|
|
doCheck = false; # This library does not have any tests at this point.
|
|
|
|
|
2017-07-21 15:22:15 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-07-23 12:22:58 +02:00
|
|
|
sha256 = "1lfqsll3wv1wzn98ymmcbw0yawj8ab3mxniws6kaxf99jd4a0xp4";
|
2017-07-21 15:22:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/linode/python-linode-api";
|
|
|
|
description = "The official python library for the Linode API v4 in python.";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ glenns ];
|
|
|
|
};
|
|
|
|
}
|