1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 python, 6 pytestCheckHook, 7 setuptools, 8 isPyPy, 9}: 10 11buildPythonPackage rec { 12 pname = "pycodestyle"; 13 version = "2.14.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "PyCQA"; 18 repo = "pycodestyle"; 19 tag = version; 20 hash = "sha256-1EEQp/QEulrdU9tTe28NerQ33IWlAiSlicpmNYciW88="; 21 }; 22 23 build-system = [ setuptools ]; 24 25 pythonImportsCheck = [ "pycodestyle" ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 # https://github.com/PyCQA/pycodestyle/blob/2.14.0/tox.ini#L16 30 postCheck = '' 31 ${python.interpreter} -m pycodestyle --statistics pycodestyle.py 32 ''; 33 34 disabledTests = lib.optionals isPyPy [ 35 # PyPy reports a SyntaxError instead of ValueError 36 "test_check_nullbytes" 37 ]; 38 39 meta = { 40 changelog = "https://github.com/PyCQA/pycodestyle/blob/${src.tag}/CHANGES.txt"; 41 description = "Python style guide checker"; 42 mainProgram = "pycodestyle"; 43 homepage = "https://pycodestyle.pycqa.org/"; 44 license = lib.licenses.mit; 45 maintainers = with lib.maintainers; [ kamadorueda ]; 46 }; 47}