1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 importlib-metadata,
6 isort,
7 poetry-core,
8 pytest,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "pytest-isort";
15 version = "4.0.0";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "stephrdev";
22 repo = "pytest-isort";
23 tag = version;
24 hash = "sha256-fMt2tYc+Ngb57T/VJYxI2UN25qvIrgIsEoImVIitDK4=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 buildInputs = [ pytest ];
30
31 propagatedBuildInputs = [ isort ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "pytest_isort" ];
36
37 meta = with lib; {
38 description = "Pytest plugin to perform isort checks (import ordering)";
39 homepage = "https://github.com/moccu/pytest-isort/";
40 changelog = "https://github.com/stephrdev/pytest-isort/blob/${version}/CHANGELOG.rst";
41 license = licenses.bsd3;
42 maintainers = [ ];
43 };
44}