1{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, unittest2 }:
2
3let
4 testPath =
5 if isPy3k
6 then "test_*_py3.py"
7 else "test_*_py2_py3.py";
8in
9
10buildPythonPackage rec {
11 pname = "dependency-injector";
12 version = "3.30.4";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "717388a9346883eb5def3e96def7275763f2a607cac48c272f352e3834e0bd0d";
17 };
18
19 propagatedBuildInputs = [ six ];
20 checkInputs = [ unittest2 ];
21
22 checkPhase = ''
23 unit2 discover -s tests/unit -p "${testPath}"
24 '';
25
26 meta = with stdenv.lib; {
27 description = "Dependency injection microframework for Python";
28 homepage = "https://github.com/ets-labs/python-dependency-injector";
29 license = licenses.bsd3;
30 maintainers = with maintainers; [ gerschtli ];
31 };
32}