nixpkgs/pkgs/development/python-modules/pyupgrade/default.nix

34 lines
731 B
Nix
Raw Normal View History

2021-03-05 01:23:13 +00:00
{ buildPythonPackage
, fetchFromGitHub
, isPy27
, lib
, pytestCheckHook
, tokenize-rt
}:
buildPythonPackage rec {
pname = "pyupgrade";
version = "2.19.1";
2021-03-05 01:23:13 +00:00
disabled = isPy27;
src = fetchFromGitHub {
owner = "asottile";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zDT8VskHEX4uldMvxnb9A+FKMuvZbtEcmdVl5mghTs4=";
2021-03-05 01:23:13 +00:00
};
checkInputs = [ pytestCheckHook ];
2021-03-05 01:23:13 +00:00
propagatedBuildInputs = [ tokenize-rt ];
pythonImportsCheck = [ "pyupgrade" ];
2021-03-05 01:23:13 +00:00
meta = with lib; {
description = "Tool to automatically upgrade syntax for newer versions of the language";
homepage = "https://github.com/asottile/pyupgrade";
license = licenses.mit;
2021-03-05 01:23:13 +00:00
maintainers = with maintainers; [ lovesegfault ];
};
}