1{
2 lib,
3 buildPythonPackage,
4 classify-imports,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "reorder-python-imports";
13 version = "3.15.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "asottile";
20 repo = "reorder_python_imports";
21 tag = "v${version}";
22 hash = "sha256-oBzEPKcJO/M13+KSLZYSeMgwo28J7TZOj6H2YHkFWHU=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [ classify-imports ];
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 homepage = "https://github.com/asottile/reorder_python_imports";
40 license = licenses.mit;
41 maintainers = with maintainers; [ gador ];
42 mainProgram = "reorder-python-imports";
43 };
44}