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