2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, six, unittest2, pyyaml, flask }:
|
2018-12-27 02:46:51 +00:00
|
|
|
|
|
|
|
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-12-14 09:43:06 +00:00
|
|
|
version = "4.5.4";
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-14 09:43:06 +00:00
|
|
|
sha256 = "99e65335cb84d543ebb47e76edadc695d062e5c25cc474698f50ed5e2aaa9002";
|
2018-09-01 16:29:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
2020-09-11 12:53:00 +01:00
|
|
|
checkInputs = [ unittest2 pyyaml flask ];
|
2018-09-21 19:08:02 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-09-01 16:29:47 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|