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";
|
2019-04-16 18:15:35 +01:00
|
|
|
version = "3.14.5";
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-16 18:15:35 +01:00
|
|
|
sha256 = "5e0c73fbec99d2782479f6d8c292be87ed8672eb42b451e7f7a5d52a3458c4e5";
|
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";
|
|
|
|
homepage = https://github.com/ets-labs/python-dependency-injector;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
};
|
|
|
|
}
|