blob: 4689050ba6c700cf921ffb610cc3cfb823eb83ed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ stdenv,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
lib,
requests,
future,
enum34,
mock }:
buildPythonPackage rec {
pname = "linode-api";
version = "4.1.8b1"; # NOTE: this is a beta, and the API may change in future versions.
disabled = (pythonOlder "2.7");
propagatedBuildInputs = [ requests future ]
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") ''
sed -i -e '/"enum34",/d' setup.py
'');
doCheck = true;
checkInputs = [ mock ];
# Sources from Pypi exclude test fixtures
src = fetchFromGitHub {
rev = "v${version}";
owner = "linode";
repo = "python-linode-api";
sha256 = "0qfqn92fr876dncwbkf2vhm90hnf7lwpg80hzwyzyzwz1hcngvjg";
};
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 ];
};
}
|