2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, unittest2, pyyaml, flask }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
testPath =
|
|
|
|
if isPy3k
|
|
|
|
then "test_*_py3.py"
|
|
|
|
else "test_*_py2_py3.py";
|
|
|
|
in
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dependency-injector";
|
2020-11-30 08:33:03 +00:00
|
|
|
version = "4.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-30 08:33:03 +00:00
|
|
|
sha256 = "1d5d42a3547a8a8d3b7aa8f4325e5042231bbc86718c89e123c0c62c103cd9d5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = [ unittest2 pyyaml flask ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
unit2 discover -s tests/unit -p "${testPath}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Dependency injection microframework for Python";
|
|
|
|
homepage = "https://github.com/ets-labs/python-dependency-injector";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
};
|
|
|
|
}
|