2018-12-27 03:46:51 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, unittest2 }:
|
|
|
|
|
|
|
|
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";
|
2019-05-30 08:49:49 +02:00
|
|
|
version = "3.14.6";
|
2018-09-01 17:29:47 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-05-30 08:49:49 +02:00
|
|
|
sha256 = "2e1889a0981381f557b0d14cba900adf7476817c53c13bfb04e2a30b3db0f1d3";
|
2018-09-01 17:29:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
2018-09-21 20:08:02 +02:00
|
|
|
checkInputs = [ unittest2 ];
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|