2017-07-21 14:22:15 +01:00
|
|
|
{ stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy3k,
|
|
|
|
pythonOlder,
|
|
|
|
lib,
|
|
|
|
requests,
|
|
|
|
future,
|
|
|
|
enum34 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "linode-api";
|
2017-08-23 14:31:04 +01:00
|
|
|
version = "4.1.2b0"; # 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;
|
2017-08-23 14:31:04 +01:00
|
|
|
sha256 = "19yzyb4sbxib8yxmrqm6d8i0fm8cims56q7kiq2ana26nbcm0gr4";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|