summary refs log blame commit diff
path: root/pkgs/development/python-modules/typeguard/default.nix
blob: 0af8c47e35cb61af9319d5a31f35291ad5a37ce7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                               
                    


                          
                                                                                

















                                                                                                                      
                                                      


                           
{ buildPythonPackage
, fetchPypi
, pythonOlder
, stdenv
, setuptools_scm
, pytest
}:

buildPythonPackage rec {
  name = "${pname}-${version}";
  pname = "typeguard";
  version = "2.1.4";

  src = fetchPypi {
    inherit pname version;
    sha256 = "40b22d18d2215b76b3ddda2564acfbddfa6e702968637fbd969187c2a6fb99da";
  };

  buildInputs = [ setuptools_scm ];

  postPatch = ''
    substituteInPlace setup.cfg --replace " --cov" ""
  '';

  checkInputs = [ pytest ];

  checkPhase = ''
    py.test .
  '';

  disabled = pythonOlder "3.3";

  meta = with stdenv.lib; {
    description = "This library provides run-time type checking for functions defined with argument type annotations";
    homepage = https://github.com/agronholm/typeguard;
    license = licenses.mit;
  };
}