1{ lib, buildPythonPackage, fetchPypi, isPy27, futures, mock, pytest }:
2
3buildPythonPackage rec {
4 pname = "isort";
5 version = "4.3.4";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "1y0yfv56cqyh9wyg7kxxv9y5wmfgcq18n7a49mp7xmzka2bhxi5r";
10 };
11
12 propagatedBuildInputs = lib.optional isPy27 futures;
13
14 checkInputs = [ mock pytest ];
15
16 checkPhase = ''
17 py.test test_isort.py -k "not test_long_line_comments \
18 and not test_import_case_produces_inconsistent_results_issue_472 \
19 and not test_no_extra_lines_issue_557"
20 '';
21
22 meta = with lib; {
23 description = "A Python utility / library to sort Python imports";
24 homepage = https://github.com/timothycrosley/isort;
25 license = licenses.mit;
26 maintainers = with maintainers; [ couchemar nand0p ];
27 };
28}