1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, poetry-core 6, snowballstemmer 7, tomli 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "pydocstyle"; 13 version = "6.3.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "PyCQA"; 20 repo = "pydocstyle"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-MjRrnWu18f75OjsYIlOLJK437X3eXnlW8WkkX7vdS6k="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace 'version = "0.0.0-dev"' 'version = "${version}"' 32 ''; 33 34 propagatedBuildInputs = [ 35 snowballstemmer 36 ] ++ lib.optionals (pythonOlder "3.11") [ 37 tomli 38 ]; 39 40 passthru.optional-dependencies.toml = [ 41 tomli 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ] ++ passthru.optional-dependencies.toml; 47 48 disabledTestPaths = [ 49 "src/tests/test_integration.py" # runs pip install 50 ]; 51 52 meta = with lib; { 53 description = "Python docstring style checker"; 54 homepage = "https://github.com/PyCQA/pydocstyle"; 55 changelog = "https://github.com/PyCQA/pydocstyle/blob/${version}/docs/release_notes.rst"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ dzabraev ]; 58 }; 59}