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-01-17 15:12:54 +00:00
|
|
|
version = "3.14.4";
|
2018-09-01 16:29:47 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-17 15:12:54 +00:00
|
|
|
sha256 = "ecac135cc4e5824b6bf8242679fc7225f44885877677701da6de7703f060f518";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|