depot/third_party/nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

32 lines
788 B
Nix

{ lib, buildPythonPackage, fetchPypi, isPy3k, six, unittest2, pyyaml, flask }:
let
testPath =
if isPy3k
then "test_*_py3.py"
else "test_*_py2_py3.py";
in
buildPythonPackage rec {
pname = "dependency-injector";
version = "4.5.4";
src = fetchPypi {
inherit pname version;
sha256 = "99e65335cb84d543ebb47e76edadc695d062e5c25cc474698f50ed5e2aaa9002";
};
propagatedBuildInputs = [ six ];
checkInputs = [ unittest2 pyyaml flask ];
checkPhase = ''
unit2 discover -s tests/unit -p "${testPath}"
'';
meta = with lib; {
description = "Dependency injection microframework for Python";
homepage = "https://github.com/ets-labs/python-dependency-injector";
license = licenses.bsd3;
maintainers = with maintainers; [ gerschtli ];
};
}