1{ lib, buildPythonPackage, fetchurl, requests, novaclient, keyring,
2 rackspace-novaclient, six, isPy3k, pytest, glibcLocales }:
3buildPythonPackage rec {
4 pname = "pyrax";
5 version = "1.9.8";
6 name = "${pname}-${version}";
7
8 src = fetchurl {
9 url = "mirror://pypi/p/pyrax/${name}.tar.gz";
10 sha256 = "1x98jzyxnvha81pgx3jpfixljhs7zik89yfp8q06kwpx8ws99nz9";
11 };
12
13 # no good reason given in commit why limited, and seems to work
14 patchPhase = ''
15 substituteInPlace "setup.py" \
16 --replace "python-novaclient==2.27.0" "python-novaclient"
17 '';
18
19 disabled = isPy3k;
20 propagatedBuildInputs = [ requests novaclient keyring rackspace-novaclient six ];
21
22 LC_ALL = "en_US.UTF-8";
23 buildInputs = [ pytest glibcLocales ];
24
25 checkPhase = ''
26 py.test tests/unit
27 '';
28
29 meta = {
30 homepage = https://github.com/rackspace/pyrax;
31 license = lib.licenses.asl20;
32 description = "Python API to interface with Rackspace";
33 maintainers = with lib.maintainers; [ teh ];
34 };
35}