587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
48 lines
1,019 B
Nix
48 lines
1,019 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, python
|
|
, pythonOlder
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "findimports";
|
|
version = "2.4.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mgedmin";
|
|
repo = "findimports";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-ar05DYSc/raYC1RJyLCxDYnd7Zjx20aczywlb6wc67Y=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
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";
|
|
mainProgram = "findimports";
|
|
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 ];
|
|
};
|
|
}
|