about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyrax.nix
blob: 7857f46e24223b26763f3870511bc31ee9f49980 (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
{ lib, buildPythonPackage, fetchurl, requests, novaclient, keyring,
  rackspace-novaclient, six, isPy3k, pytest, glibcLocales }:
buildPythonPackage rec {
  pname = "pyrax";
  version = "1.9.8";
  name = "${pname}-${version}";

  src = fetchurl {
    url = "mirror://pypi/p/pyrax/${name}.tar.gz";
    sha256 = "1x98jzyxnvha81pgx3jpfixljhs7zik89yfp8q06kwpx8ws99nz9";
  };

  # no good reason given in commit why limited, and seems to work
  patchPhase = ''
      substituteInPlace "setup.py"                                     \
              --replace "python-novaclient==2.27.0" "python-novaclient"
    '';

  disabled = isPy3k;
  propagatedBuildInputs = [ requests novaclient keyring rackspace-novaclient six ];

  LC_ALL = "en_US.UTF-8";
  buildInputs = [ pytest glibcLocales ];

  checkPhase = ''
    py.test tests/unit
  '';

  meta = {
    homepage = "https://github.com/rackspace/pyrax";
    license = lib.licenses.asl20;
    description = "Python API to interface with Rackspace";
    maintainers = with lib.maintainers; [ teh ];
  };
}