2018-03-01 10:15:50 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder
|
2018-03-01 10:03:17 +00:00
|
|
|
, snowballstemmer, six, configparser
|
|
|
|
, pytest, pytestpep8, mock, pathlib }:
|
2018-01-19 16:22:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydocstyle";
|
|
|
|
version = "2.1.1";
|
|
|
|
|
2018-03-01 10:13:09 +00:00
|
|
|
# no tests on PyPI
|
|
|
|
# https://github.com/PyCQA/pydocstyle/issues/302
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1h0k8lpx14svc8dini62j0kqiam10pck5sdzvxa4xhsx7y689g5l";
|
2018-01-19 16:22:37 +00:00
|
|
|
};
|
|
|
|
|
2018-03-01 10:03:17 +00:00
|
|
|
propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser;
|
2018-01-19 16:22:37 +00:00
|
|
|
|
2018-03-01 10:15:50 +00:00
|
|
|
checkInputs = [ pytest pytestpep8 mock ] ++ lib.optional (pythonOlder "3.4") pathlib;
|
2018-01-19 16:22:37 +00:00
|
|
|
|
2018-03-01 10:13:09 +00:00
|
|
|
checkPhase = ''
|
|
|
|
# test_integration.py installs packages via pip
|
|
|
|
py.test --pep8 --cache-clear -vv src/tests -k "not test_integration"
|
|
|
|
'';
|
|
|
|
|
2018-03-01 10:03:17 +00:00
|
|
|
meta = with lib; {
|
2018-01-19 16:22:37 +00:00
|
|
|
description = "Python docstring style checker";
|
|
|
|
homepage = https://github.com/PyCQA/pydocstyle/;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dzabraev ];
|
|
|
|
};
|
|
|
|
}
|