2019-11-21 23:48:04 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder
|
|
|
|
, snowballstemmer, six, configparser
|
2020-12-11 02:14:06 +00:00
|
|
|
, pytest, mock, pathlib }:
|
2019-11-21 23:48:04 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-12-11 02:14:06 +00:00
|
|
|
checkInputs = [ pytest mock ] ++ lib.optional (pythonOlder "3.4") pathlib;
|
2019-11-21 23:48:04 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# test_integration.py installs packages via pip
|
2020-12-11 02:14:06 +00:00
|
|
|
py.test --cache-clear -vv src/tests -k "not test_integration"
|
2019-11-21 23:48:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python docstring style checker";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/PyCQA/pydocstyle/";
|
2019-11-21 23:48:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dzabraev ];
|
|
|
|
};
|
|
|
|
}
|