2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "findimports";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.4.0";
|
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mgedmin";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "findimports";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-ar05DYSc/raYC1RJyLCxDYnd7Zjx20aczywlb6wc67Y=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"findimports"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
# Tests fails
|
|
|
|
rm tests/cmdline.txt
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} testsuite.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for the analysis of Python import statements";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "findimports";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://github.com/mgedmin/findimports";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/mgedmin/findimports/blob/${version}/CHANGES.rst";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = with licenses; [ gpl2Only /* or */ gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|