2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "findimports";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.5.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
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-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-kHm0TiLe7zvUnU6+MR1M0xOt0gpMDJ5FJ5+HgY0LPeo=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "findimports" ];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
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";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
gpl2Only # or
|
|
|
|
gpl3Only
|
|
|
|
];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|