mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-10-19 12:13:19 +02:00
43 lines
851 B
Nix
43 lines
851 B
Nix
{ buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, stdenv
|
|
, setuptools_scm
|
|
, pytest
|
|
, typing-extensions
|
|
, glibcLocales
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "typeguard";
|
|
version = "2.9.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "123jnq7igm26a5347jf2j60bww9g84l80f208dzlbk49h7cg77jj";
|
|
};
|
|
|
|
buildInputs = [ setuptools_scm ];
|
|
nativeBuildInputs = [ glibcLocales ];
|
|
|
|
LC_ALL="en_US.utf-8";
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg --replace " --cov" ""
|
|
'';
|
|
|
|
checkInputs = [ pytest typing-extensions ];
|
|
|
|
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;
|
|
};
|
|
}
|