1{ stdenv, buildPythonPackage, fetchurl, python,
2 pbr, Babel, testrepository, subunit, testtools,
3 coverage, oslosphinx, oslotest, testscenarios, six, ddt
4}:
5buildPythonPackage rec {
6 version = "0.8.2";
7 pname = "os-testr";
8 name = "${pname}-${version}";
9
10 src = fetchurl {
11 url = "mirror://pypi/o/os-testr/${name}.tar.gz";
12 sha256 = "d8a60bd56c541714a5cab4d1996c8ddfdb5c7c35393d55be617803048c170837";
13 };
14
15 patchPhase = ''
16 sed -i 's@python@${python.interpreter}@' .testr.conf
17 sed -i 's@python@${python.interpreter}@' os_testr/tests/files/testr-conf
18 '';
19
20 checkPhase = ''
21 export PATH=$PATH:$out/bin
22 ${python.interpreter} setup.py test
23 '';
24
25 propagatedBuildInputs = [ pbr Babel testrepository subunit testtools ];
26 buildInputs = [ coverage oslosphinx oslotest testscenarios six ddt ];
27
28 meta = with stdenv.lib; {
29 description = "A testr wrapper to provide functionality for OpenStack projects";
30 homepage = http://docs.openstack.org/developer/os-testr/;
31 license = licenses.asl20;
32 };
33}