2018-12-27 02:46:51 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, unittest2 }:
|
|
|
|
|
|
|
|
let
|
|
|
|
testPath =
|
|
|
|
if isPy3k
|
|
|
|
then "test_*_py3.py"
|
|
|
|
else "test_*_py2_py3.py";
|
|
|
|
in
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dependency-injector";
|
2020-06-06 07:47:03 +01:00
|
|
|
version = "3.15.6";
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:03 +01:00
|
|
|
sha256 = "fcca1464f567d902983bff507b9e2e3fda0f932ee009e36f74ed5b8c348d17f4";
|
2018-09-01 16:29:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
2018-09-21 19:08:02 +01:00
|
|
|
checkInputs = [ unittest2 ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-12-27 02:46:51 +00:00
|
|
|
unit2 discover -s tests/unit -p "${testPath}"
|
2018-09-21 19:08:02 +01:00
|
|
|
'';
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Dependency injection microframework for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ets-labs/python-dependency-injector";
|
2018-09-01 16:29:47 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
};
|
|
|
|
}
|