Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / reorder-python-imports / default.nix
blob1c5417c75a19e3a5945fa9d1e23d470d27117e57
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 , aspy-refactor-imports
7 , classify-imports
8 }:
10 buildPythonPackage rec {
11   pname = "reorder-python-imports";
12   version = "3.12.0";
13   disabled = pythonOlder "3.8";
15   src = fetchFromGitHub {
16     owner = "asottile";
17     repo = "reorder_python_imports";
18     rev = "v${version}";
19     hash = "sha256-bKv9APbraR2359IzzkzXs4sEXrTvGK3J4LO3wFHOti0=";
20   };
22   propagatedBuildInputs = [
23     aspy-refactor-imports
24     classify-imports
25   ];
27   pythonImportsCheck = [
28     "reorder_python_imports"
29   ];
31   nativeCheckInputs = [
32     pytestCheckHook
33   ];
35   # prints an explanation about PYTHONPATH first
36   # and therefore fails the assertion
37   disabledTests = [
38     "test_success_messages_are_printed_on_stderr"
39   ];
41   meta = with lib; {
42     description = "Tool for automatically reordering python imports";
43     homepage = "https://github.com/asottile/reorder_python_imports";
44     license = licenses.mit;
45     maintainers = with maintainers; [ gador ];
46   };