1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, pythonOlder
6}:
7
8buildPythonPackage rec {
9 pname = "findimports";
10 version = "2.2.0";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.6";
14
15 src = fetchFromGitHub {
16 owner = "mgedmin";
17 repo = pname;
18 rev = version;
19 hash = "sha256-p13GVDXDOzOiTnRgtF7UxN1vwZRMa7wVEXJQrFQV7RU=";
20 };
21
22 pythonImportsCheck = [
23 "findimports"
24 ];
25
26 checkPhase = ''
27 runHook preCheck
28 ${python.interpreter} testsuite.py
29 runHook postCheck
30 '';
31
32 meta = with lib; {
33 description = "Module for the analysis of Python import statements";
34 homepage = "https://github.com/mgedmin/findimports";
35 license = with licenses; [ gpl2Only /* or */ gpl3Only ];
36 maintainers = with maintainers; [ fab ];
37 };
38}