about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pydocstyle/2.nix
blob: 21e39b68d12c28c6c0e1ba8f9053648368267a39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder
, snowballstemmer, six, configparser
, pytest, pytestpep8, mock, pathlib }:

buildPythonPackage rec {
  pname = "pydocstyle";
  version = "2.1.1";

  # no tests on PyPI
  # https://github.com/PyCQA/pydocstyle/issues/302
  src = fetchFromGitHub {
    owner = "PyCQA";
    repo = pname;
    rev = version;
    sha256 = "1h0k8lpx14svc8dini62j0kqiam10pck5sdzvxa4xhsx7y689g5l";
  };

  propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser;

  checkInputs = [ pytest pytestpep8 mock ] ++ lib.optional (pythonOlder "3.4") pathlib;

  checkPhase = ''
    # test_integration.py installs packages via pip
    py.test --pep8 --cache-clear -vv src/tests -k "not test_integration"
  '';

  meta = with lib; {
    description = "Python docstring style checker";
    homepage = "https://github.com/PyCQA/pydocstyle/";
    license = licenses.mit;
    maintainers = with maintainers; [ dzabraev ];
  };
}