2017-07-21 14:22:15 +01:00
|
|
|
{ stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy3k,
|
|
|
|
pythonOlder,
|
|
|
|
lib,
|
|
|
|
requests,
|
|
|
|
future,
|
|
|
|
enum34 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "linode-api";
|
2018-03-30 05:42:30 +01:00
|
|
|
version = "4.1.8b1"; # NOTE: this is a beta, and the API may change in future versions.
|
2017-07-21 14:22:15 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
disabled = (pythonOlder "2.7");
|
|
|
|
|
2017-07-24 11:42:49 +01:00
|
|
|
propagatedBuildInputs = [ requests future ]
|
2017-07-21 14:22:15 +01:00
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
|
|
|
|
|
2017-07-24 11:42:49 +01:00
|
|
|
postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") ''
|
2017-07-23 11:23:28 +01:00
|
|
|
sed -i -e '/"enum34",/d' setup.py
|
|
|
|
'');
|
|
|
|
|
2017-07-24 12:21:08 +01:00
|
|
|
doCheck = false; # This library does not have any tests at this point.
|
|
|
|
|
2017-07-21 14:22:15 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-03-30 05:42:30 +01:00
|
|
|
sha256 = "0afwqccbdmdnjc3glvn65qz0pmrbs3fa89z3wig2w4v15608p20s";
|
2017-07-21 14:22:15 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|