mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 03:23:17 +00:00
d8019d3d27
Applies a modified version of upstreams patch to fix the tests, only upstream only recognized the issue from 3.12, while it hit us on 3.11.4.
48 lines
1.2 KiB
Nix
48 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
|
|
];
|
|
};
|
|
}
|