Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage, isPyPy, fetchPypi, python
2, pbr, testtools, testresources, testrepository, mock
3, pep8, fixtures, mox3, requests-mock
4, iso8601, requests, six, stevedore, webob, oslo-config
5, pyyaml, betamax, oauthlib
6}:
7
8buildPythonPackage rec {
9 pname = "keystoneauth1";
10 version = "3.2.0";
11 name = "${pname}-${version}";
12 disabled = isPyPy; # a test fails
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "0rg3harfyvai34lrjiqnl1crmvswjvj8nsviasnz4b9pcvp3d03n";
17 };
18
19 buildInputs = [ pbr ];
20 checkInputs = [ pyyaml betamax oauthlib testtools testresources
21 testrepository mock pep8 fixtures mox3 requests-mock ];
22 propagatedBuildInputs = [ iso8601 requests six stevedore webob ];
23
24 doCheck = true;
25 # 1. oslo-config
26 # 2. oslo-utils
27 # 3. requests-kerberos
28 preCheck = ''
29 rm keystoneauth1/tests/unit/loading/test_{session,conf,adapter}.py
30 rm keystoneauth1/tests/unit/access/test_v{2,3}_access.py
31 rm keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py
32 '';
33 postPatch = ''
34 sed -i 's@python@${python.interpreter}@' .testr.conf
35 substituteInPlace requirements.txt --replace "argparse" ""
36 '';
37}