anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / flake8-polyfill / default.nix
blobfaf3c0bdb030f5dd76e3ca7338fe9066847b5960
2   lib,
3   buildPythonPackage,
4   fetchpatch,
5   fetchPypi,
6   setuptools,
7   flake8,
8   mock,
9   pep8,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "flake8-polyfill";
15   version = "1.0.2";
16   pyproject = true;
18   src = fetchPypi {
19     inherit pname version;
20     sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
21   };
23   build-system = [ setuptools ];
25   dependencies = [ flake8 ];
27   nativeCheckInputs = [
28     mock
29     pep8
30     pytestCheckHook
31   ];
33   patches = [
34     # Skip unnecessary tests on Flake8, https://github.com/PyCQA/pep8-naming/pull/181
35     (fetchpatch {
36       name = "skip-tests.patch";
37       url = "https://github.com/PyCQA/flake8-polyfill/commit/3cf414350e82ceb835ca2edbd5d5967d33e9ff35.patch";
38       sha256 = "mElZafodq8dF3wLO/LOqwFb7eLMsPLlEjNSu5AWqets=";
39     })
40   ];
42   postPatch = ''
43     # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
44     substituteInPlace setup.cfg \
45       --replace-fail pytest 'tool:pytest'
46   '';
48   pythonImportsCheck = [ "flake8_polyfill" ];
50   meta = with lib; {
51     homepage = "https://gitlab.com/pycqa/flake8-polyfill";
52     description = "Polyfill package for Flake8 plugins";
53     license = licenses.mit;
54     maintainers = with maintainers; [ eadwu ];
55   };