2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
2021-12-26 17:43:05 +00:00
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, poetry-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, snowballstemmer
|
2023-03-15 16:39:30 +00:00
|
|
|
, tomli
|
2021-12-26 17:43:05 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydocstyle";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "6.3.0";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
2023-03-15 16:39:30 +00:00
|
|
|
repo = "pydocstyle";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-MjRrnWu18f75OjsYIlOLJK437X3eXnlW8WkkX7vdS6k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0-dev"' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
snowballstemmer
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies.toml = [
|
|
|
|
tomli
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-26 17:43:05 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ passthru.optional-dependencies.toml;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"src/tests/test_integration.py" # runs pip install
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python docstring style checker";
|
2021-12-26 17:43:05 +00:00
|
|
|
homepage = "https://github.com/PyCQA/pydocstyle";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/PyCQA/pydocstyle/blob/${version}/docs/release_notes.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dzabraev ];
|
|
|
|
};
|
|
|
|
}
|