1{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder 2, snowballstemmer, six, configparser 3, pytest, pytestpep8, mock, pathlib }: 4 5buildPythonPackage rec { 6 pname = "pydocstyle"; 7 version = "2.1.1"; 8 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 }; 17 18 propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser; 19 20 checkInputs = [ pytest pytestpep8 mock ] ++ lib.optional (pythonOlder "3.4") pathlib; 21 22 checkPhase = '' 23 # test_integration.py installs packages via pip 24 py.test --pep8 --cache-clear -vv src/tests -k "not test_integration" 25 ''; 26 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 }; 33}