1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 cliff,
6 fixtures,
7 future,
8 pbr,
9 setuptools,
10 subunit,
11 testtools,
12 tomlkit,
13 voluptuous,
14 callPackage,
15}:
16
17buildPythonPackage rec {
18 pname = "stestr";
19 version = "4.1.0";
20 pyproject = true;
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-X2HDae7OY8KS0TWZ4SqhWK92hZkGQ/JN1vp/q/406Yo=";
25 };
26
27 postPatch = ''
28 # only a small portion of the listed packages are actually needed for running the tests
29 # so instead of removing them one by one remove everything
30 rm test-requirements.txt
31 '';
32
33 nativeBuildInputs = [
34 pbr
35 setuptools
36 ];
37
38 propagatedBuildInputs = [
39 cliff
40 fixtures
41 future
42 pbr
43 subunit
44 testtools
45 tomlkit
46 voluptuous
47 ];
48
49 # check in passthru.tests.pytest to escape infinite recursion with other oslo components
50 doCheck = false;
51
52 passthru.tests = {
53 tests = callPackage ./tests.nix { };
54 };
55
56 pythonImportsCheck = [ "stestr" ];
57
58 meta = with lib; {
59 description = "A parallel Python test runner built around subunit";
60 mainProgram = "stestr";
61 homepage = "https://github.com/mtreinish/stestr";
62 license = licenses.asl20;
63 maintainers = teams.openstack.members;
64 };
65}