Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / findimports / default.nix
blobff6c6579d7381cec34f5ace4d04402c8aca504f0
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , python
5 , pythonOlder
6 }:
8 buildPythonPackage rec {
9   pname = "findimports";
10   version = "2.3.0";
11   format = "setuptools";
13   disabled = pythonOlder "3.6";
15   src = fetchFromGitHub {
16     owner = "mgedmin";
17     repo = pname;
18     rev = "refs/tags/${version}";
19     hash = "sha256-yA1foeGhgOXZArc/nZfS1tbGyONXJZ9lW+Zcx7hCedM=";
20   };
22   pythonImportsCheck = [
23     "findimports"
24   ];
26   checkPhase = ''
27     # Tests fails
28     rm tests/cmdline.txt
30     runHook preCheck
31     ${python.interpreter} testsuite.py
32     runHook postCheck
33   '';
35   meta = with lib; {
36     description = "Module for the analysis of Python import statements";
37     homepage = "https://github.com/mgedmin/findimports";
38     changelog = "https://github.com/mgedmin/findimports/blob/${version}/CHANGES.rst";
39     license = with licenses; [ gpl2Only /* or */ gpl3Only ];
40     maintainers = with maintainers; [ fab ];
41   };