linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / pydocstyle / 2.nix
blob9ce4ffc0f816ac308f3bedc006dbbb67b362c166
1 { lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder
2 , snowballstemmer, six, configparser
3 , pytest, mock, pathlib }:
5 buildPythonPackage rec {
6   pname = "pydocstyle";
7   version = "2.1.1";
9   # no tests on PyPI
10   # https://github.com/PyCQA/pydocstyle/issues/302
11   src = fetchFromGitHub {
12     owner = "PyCQA";
13     repo = pname;
14     rev = version;
15     sha256 = "1h0k8lpx14svc8dini62j0kqiam10pck5sdzvxa4xhsx7y689g5l";
16   };
18   propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser;
20   checkInputs = [ pytest mock ] ++ lib.optional (pythonOlder "3.4") pathlib;
22   checkPhase = ''
23     # test_integration.py installs packages via pip
24     py.test --cache-clear -vv src/tests -k "not test_integration"
25   '';
27   meta = with lib; {
28     description = "Python docstring style checker";
29     homepage = "https://github.com/PyCQA/pydocstyle/";
30     license = licenses.mit;
31     maintainers = with maintainers; [ dzabraev ];
32   };