perlPackages.NetAsyncWebSocket: 0.13 -> 0.14 (#352432)
[NixPkgs.git] / pkgs / development / python-modules / isort / default.nix
blob32ff65a3914480b0b23076daa5f80f65092ff61f
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   colorama,
6   hypothesis,
7   poetry-core,
8   setuptools,
9   pylama,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "isort";
15   version = "5.13.2";
16   format = "pyproject";
18   src = fetchFromGitHub {
19     owner = "PyCQA";
20     repo = "isort";
21     rev = "refs/tags/${version}";
22     hash = "sha256-/1iKYmtNRw9u59zzJDwV7b9+EPxFJDHvhjTioGt5LLU=";
23   };
25   nativeBuildInputs = [
26     poetry-core
27     setuptools
28   ];
30   nativeCheckInputs = [
31     colorama
32     hypothesis
33     pylama
34     pytestCheckHook
35   ];
37   postCheck = ''
38     # Confirm that the produced executable script is wrapped correctly and runs
39     # OK, by launching it in a subshell without PYTHONPATH
40     (
41       unset PYTHONPATH
42       echo "Testing that `isort --version-number` returns OK..."
43       $out/bin/isort --version-number
44     )
45   '';
47   preCheck = ''
48     HOME=$TMPDIR
49     export PATH=$PATH:$out/bin
50   '';
52   pytestFlagsArray = [
53     "--ignore=tests/benchmark/" # requires pytest-benchmark
54     "--ignore=tests/integration/" # pulls in 10 other packages
55     "--ignore=tests/unit/profiles/test_black.py" # causes infinite recursion to include black
56   ];
58   disabledTests = [
59     "test_run" # doesn't like paths in /build
60     "test_fuzz_show_unified_diff" # flakey
61     "test_pyi_formatting_issue_942"
62     "test_requirements_finder"
63     "test_pipfile_finder"
64     "test_main" # relies on git
65     "test_command_line" # not thread safe
66     "test_encoding_not_in_comment" # not python 3.9 compatible
67     "test_encoding_not_in_first_two_lines" # not python 3.9 compatible
68     "test_requirements_dir" # requires network
69     # plugin not available
70     "test_isort_literals_issue_1358"
71     "test_isort_supports_formatting_plugins_issue_1353"
72     "test_sort_configurable_sort_issue_1732"
73     "test_value_assignment_list"
74     # profiles not available
75     "test_isort_supports_shared_profiles_issue_970"
76     # https://github.com/PyCQA/isort/issues/2234
77     "test_isort_should_warn_on_empty_custom_config_issue_1433"
78   ];
80   meta = with lib; {
81     description = "Python utility / library to sort Python imports";
82     homepage = "https://github.com/PyCQA/isort";
83     license = licenses.mit;
84     maintainers = with maintainers; [ couchemar ];
85     mainProgram = "isort";
86   };