depot/third_party/nixpkgs/pkgs/development/python-modules/pycodestyle/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

47 lines
1.2 KiB
Nix

{ buildPythonPackage
, pythonOlder
, fetchPypi
, lib
, python
}:
buildPythonPackage rec {
pname = "pycodestyle";
version = "2.10.0";
disabled = pythonOlder "3.6";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-NHGHvbR2Mp2Y9pXCE9cpWoRtEVL/T+m6y4qVkLjucFM=";
};
patches = [
# https://github.com/PyCQA/pycodestyle/issues/1151
# Applies a modified version of an upstream patch that only applied
# to Python 3.12.
./python-3.11.4-compat.patch
];
# https://github.com/PyCQA/pycodestyle/blob/2.10.0/tox.ini#L13
checkPhase = ''
${python.interpreter} -m pycodestyle --statistics pycodestyle.py
${python.interpreter} -m pycodestyle --max-doc-length=72 --testsuite testsuite
${python.interpreter} -m pycodestyle --max-doc-length=72 --doctest
${python.interpreter} -m unittest discover testsuite -vv
'';
pythonImportsCheck = [ "pycodestyle" ];
meta = with lib; {
changelog = "https://github.com/PyCQA/pycodestyle/blob/${version}/CHANGES.txt";
description = "Python style guide checker";
homepage = "https://pycodestyle.pycqa.org/";
license = licenses.mit;
maintainers = with maintainers; [
kamadorueda
];
};
}