1{ lib, buildPythonPackage, fetchPypi, isPy27, mock, pytest, isort }:
2
3buildPythonPackage rec {
4 pname = "pytest-isort";
5 version = "2.0.0";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "821a8c5c9c4f3a3c52cfa9c541fbe89ac9e28728125125af53724c4c3f129117";
10 };
11
12 propagatedBuildInputs = [ isort ];
13
14 checkInputs = [ pytest ]
15 ++ lib.optionals isPy27 [ mock ];
16
17 checkPhase = ''
18 py.test -vs --cache-clear
19 '';
20
21 meta = with lib; {
22 description = "Pytest plugin to perform isort checks (import ordering)";
23 homepage = "https://github.com/moccu/pytest-isort/";
24 license = licenses.bsd3;
25 };
26}