2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, six, unittest2, pyyaml, flask }:
|
2018-12-27 03:46:51 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
testPath =
|
|
|
|
if isPy3k
|
|
|
|
then "test_*_py3.py"
|
|
|
|
else "test_*_py2_py3.py";
|
|
|
|
in
|
2018-09-01 17:29:47 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dependency-injector";
|
2021-03-24 10:28:11 +01:00
|
|
|
version = "4.31.1";
|
2018-09-01 17:29:47 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 10:28:11 +01:00
|
|
|
sha256 = "b6b28b9571f44d575367c6005ba8aaa9fd2b70310e1c15410925d6f1ee2769ad";
|
2018-09-01 17:29:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
2020-09-11 13:53:00 +02:00
|
|
|
checkInputs = [ unittest2 pyyaml flask ];
|
2018-09-21 20:08:02 +02:00
|
|
|
|
|
|
|
checkPhase = ''
|
2018-12-27 03:46:51 +01:00
|
|
|
unit2 discover -s tests/unit -p "${testPath}"
|
2018-09-21 20:08:02 +02:00
|
|
|
'';
|
2018-09-01 17:29:47 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-09-01 17:29:47 +02:00
|
|
|
description = "Dependency injection microframework for Python";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/ets-labs/python-dependency-injector";
|
2018-09-01 17:29:47 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
};
|
|
|
|
}
|