nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 59 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 fetchpatch2, 7 poetry-core, 8 snowballstemmer, 9 tomli, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "pydocstyle"; 15 version = "6.3.0"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "PyCQA"; 20 repo = "pydocstyle"; 21 tag = version; 22 hash = "sha256-MjRrnWu18f75OjsYIlOLJK437X3eXnlW8WkkX7vdS6k="; 23 }; 24 25 patches = [ 26 # https://github.com/PyCQA/pydocstyle/pull/656 27 (fetchpatch2 { 28 name = "python312-compat.patch"; 29 url = "https://github.com/PyCQA/pydocstyle/commit/306c7c8f2d863bdc098a65d2dadbd4703b9b16d5.patch"; 30 hash = "sha256-bqnoLz1owzDpFqlZn8z4Z+RzKCYBsI0PqqeOtjLxnMo="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ poetry-core ]; 35 36 postPatch = '' 37 substituteInPlace pyproject.toml \ 38 --replace 'version = "0.0.0-dev"' 'version = "${version}"' 39 ''; 40 41 propagatedBuildInputs = [ snowballstemmer ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 42 43 optional-dependencies.toml = [ tomli ]; 44 45 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.toml; 46 47 disabledTestPaths = [ 48 "src/tests/test_integration.py" # runs pip install 49 ]; 50 51 meta = { 52 description = "Python docstring style checker"; 53 mainProgram = "pydocstyle"; 54 homepage = "https://github.com/PyCQA/pydocstyle"; 55 changelog = "https://github.com/PyCQA/pydocstyle/blob/${version}/docs/release_notes.rst"; 56 license = lib.licenses.mit; 57 maintainers = with lib.maintainers; [ dzabraev ]; 58 }; 59}