Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage 2, pythonOlder 3, fetchPypi 4, lib 5, python 6}: 7 8buildPythonPackage rec { 9 pname = "pycodestyle"; 10 version = "2.10.0"; 11 12 disabled = pythonOlder "3.6"; 13 14 format = "setuptools"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-NHGHvbR2Mp2Y9pXCE9cpWoRtEVL/T+m6y4qVkLjucFM="; 19 }; 20 21 patches = [ 22 # https://github.com/PyCQA/pycodestyle/issues/1151 23 # Applies a modified version of an upstream patch that only applied 24 # to Python 3.12. 25 ./python-3.11.4-compat.patch 26 ]; 27 28 # https://github.com/PyCQA/pycodestyle/blob/2.10.0/tox.ini#L13 29 checkPhase = '' 30 ${python.interpreter} -m pycodestyle --statistics pycodestyle.py 31 ${python.interpreter} -m pycodestyle --max-doc-length=72 --testsuite testsuite 32 ${python.interpreter} -m pycodestyle --max-doc-length=72 --doctest 33 ${python.interpreter} -m unittest discover testsuite -vv 34 ''; 35 36 pythonImportsCheck = [ "pycodestyle" ]; 37 38 meta = with lib; { 39 changelog = "https://github.com/PyCQA/pycodestyle/blob/${version}/CHANGES.txt"; 40 description = "Python style guide checker"; 41 homepage = "https://pycodestyle.pycqa.org/"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ 44 kamadorueda 45 ]; 46 }; 47}