Files
nixpkgs/pkgs/development/python-modules/pylama/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

87 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
git,
eradicate,
mccabe,
mypy,
pycodestyle,
pydocstyle,
pyflakes,
vulture,
setuptools,
pylint,
pytestCheckHook,
}:
let
pylama = buildPythonPackage rec {
pname = "pylama";
version = "8.4.1";
format = "setuptools";
src = fetchFromGitHub {
name = "${pname}-${version}-source";
owner = "klen";
repo = "pylama";
rev = version;
hash = "sha256-WOGtZ412tX3YH42JCd5HIngunluwtMmQrOSUZp23LPU=";
};
patches = [
(replaceVars ./paths.patch {
git = "${lib.getBin git}/bin/git";
})
];
propagatedBuildInputs = [
eradicate
mccabe
mypy
pycodestyle
pydocstyle
pyflakes
setuptools
vulture
];
# escape infinite recursion pylint -> isort -> pylama
doCheck = false;
nativeCheckInputs = [
pylint
pytestCheckHook
];
preCheck = ''
export HOME=$TEMP
'';
disabledTests = [
"test_quotes" # FIXME package pylama-quotes
"test_radon" # FIXME package radon
];
pythonImportsCheck = [ "pylama.main" ];
passthru.tests = {
check = pylama.overridePythonAttrs (_: {
doCheck = true;
});
};
meta = with lib; {
description = "Code audit tool for python";
mainProgram = "pylama";
homepage = "https://github.com/klen/pylama";
changelog = "https://github.com/klen/pylama/blob/${version}/Changelog";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
};
in
pylama