summary refs log tree commit diff
path: root/pkgs/development/python-modules/os-testr/default.nix
blob: d97c525b17a8c9cb228af8ebb5f5beff289e41eb (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
{ stdenv, buildPythonPackage, fetchurl, python,
  pbr, Babel, testrepository, subunit, testtools,
  coverage, oslosphinx, oslotest, testscenarios, six, ddt 
}:
buildPythonPackage rec {
  version = "0.8.2";
  pname = "os-testr";
  name = "${pname}-${version}";

  src = fetchurl {
    url = "mirror://pypi/o/os-testr/${name}.tar.gz";
    sha256 = "d8a60bd56c541714a5cab4d1996c8ddfdb5c7c35393d55be617803048c170837";
  };

  patchPhase = ''
    sed -i 's@python@${python.interpreter}@' .testr.conf
    sed -i 's@python@${python.interpreter}@' os_testr/tests/files/testr-conf
  '';

  checkPhase = ''
    export PATH=$PATH:$out/bin
    ${python.interpreter} setup.py test
  '';

  propagatedBuildInputs = [ pbr Babel testrepository subunit testtools ];
  buildInputs = [ coverage oslosphinx oslotest testscenarios six ddt ];

  meta = with stdenv.lib; {
    description = "A testr wrapper to provide functionality for OpenStack projects";
    homepage  = http://docs.openstack.org/developer/os-testr/;
    license = licenses.asl20;
  };
}