wlroots: 0.18.1 -> 0.18.2 (#364488)
[NixPkgs.git] / pkgs / development / python-modules / pydocstyle / default.nix
blob47abe284a8672ff137c632ffe193ae0ed6576bea
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   fetchpatch2,
7   poetry-core,
8   snowballstemmer,
9   tomli,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "pydocstyle";
15   version = "6.3.0";
16   pyproject = true;
18   disabled = pythonOlder "3.6";
20   src = fetchFromGitHub {
21     owner = "PyCQA";
22     repo = "pydocstyle";
23     rev = "refs/tags/${version}";
24     hash = "sha256-MjRrnWu18f75OjsYIlOLJK437X3eXnlW8WkkX7vdS6k=";
25   };
27   patches = [
28     # https://github.com/PyCQA/pydocstyle/pull/656
29     (fetchpatch2 {
30       name = "python312-compat.patch";
31       url = "https://github.com/PyCQA/pydocstyle/commit/306c7c8f2d863bdc098a65d2dadbd4703b9b16d5.patch";
32       hash = "sha256-bqnoLz1owzDpFqlZn8z4Z+RzKCYBsI0PqqeOtjLxnMo=";
33     })
34   ];
36   nativeBuildInputs = [ poetry-core ];
38   postPatch = ''
39     substituteInPlace pyproject.toml \
40       --replace 'version = "0.0.0-dev"' 'version = "${version}"'
41   '';
43   propagatedBuildInputs = [ snowballstemmer ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
45   optional-dependencies.toml = [ tomli ];
47   nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.toml;
49   disabledTestPaths = [
50     "src/tests/test_integration.py" # runs pip install
51   ];
53   meta = with lib; {
54     description = "Python docstring style checker";
55     mainProgram = "pydocstyle";
56     homepage = "https://github.com/PyCQA/pydocstyle";
57     changelog = "https://github.com/PyCQA/pydocstyle/blob/${version}/docs/release_notes.rst";
58     license = licenses.mit;
59     maintainers = with maintainers; [ dzabraev ];
60   };