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