depot/third_party/nixpkgs/pkgs/development/python-modules/findimports/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

42 lines
925 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "findimports";
version = "2.3.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "mgedmin";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-yA1foeGhgOXZArc/nZfS1tbGyONXJZ9lW+Zcx7hCedM=";
};
pythonImportsCheck = [
"findimports"
];
checkPhase = ''
# Tests fails
rm tests/cmdline.txt
runHook preCheck
${python.interpreter} testsuite.py
runHook postCheck
'';
meta = with lib; {
description = "Module for the analysis of Python import statements";
homepage = "https://github.com/mgedmin/findimports";
changelog = "https://github.com/mgedmin/findimports/blob/${version}/CHANGES.rst";
license = with licenses; [ gpl2Only /* or */ gpl3Only ];
maintainers = with maintainers; [ fab ];
};
}