3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pydocstyle/default.nix

34 lines
984 B
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder
, snowballstemmer, six, configparser
, pytest, pytestpep8, mock, pathlib }:
2018-01-19 16:22:37 +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";
2018-01-19 16:22:37 +00:00
};
propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser;
2018-01-19 16:22:37 +00:00
checkInputs = [ pytest pytestpep8 mock ] ++ lib.optional (pythonOlder "3.4") pathlib;
2018-01-19 16:22:37 +00:00
checkPhase = ''
# test_integration.py installs packages via pip
py.test --pep8 --cache-clear -vv src/tests -k "not test_integration"
'';
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 ];
};
}