about summary refs log tree commit diff
path: root/pkgs/development/python-modules/keystoneauth1/default.nix
blob: 7405f7f74cd566c4b8392a0fa2732e6e2b4f07b6 (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
{ buildPythonPackage, isPyPy, fetchPypi, python
, pbr, testtools, testresources, testrepository, mock
, pep8, fixtures, mox3, requests-mock
, iso8601, requests, six, stevedore, webob, oslo-config
, pyyaml, betamax, oauthlib
}:

buildPythonPackage rec {
  pname = "keystoneauth1";
  version = "3.2.0";
  name = "${pname}-${version}";
  disabled = isPyPy; # a test fails

  src = fetchPypi {
    inherit pname version;
    sha256 = "0rg3harfyvai34lrjiqnl1crmvswjvj8nsviasnz4b9pcvp3d03n";
  };

  buildInputs = [ pbr  ];
  checkInputs = [ pyyaml betamax oauthlib testtools testresources
                  testrepository mock pep8 fixtures mox3 requests-mock ];
  propagatedBuildInputs = [ iso8601 requests six stevedore webob ];

  doCheck = true;
  # 1. oslo-config
  # 2. oslo-utils
  # 3. requests-kerberos
  preCheck = ''
    rm keystoneauth1/tests/unit/loading/test_{session,conf,adapter}.py
    rm keystoneauth1/tests/unit/access/test_v{2,3}_access.py
    rm keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py
  '';
  postPatch = ''
    sed -i 's@python@${python.interpreter}@' .testr.conf
    substituteInPlace requirements.txt --replace "argparse" ""
  '';
}