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