2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
git,
|
|
|
|
mock,
|
|
|
|
pep440,
|
|
|
|
pip,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools-scm,
|
|
|
|
six,
|
|
|
|
wheel,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "setupmeta";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.6.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codrsquad";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-OI7PU5LQ6w0iAbK7nsP+6RizsEWjKP9nec2J6n0xUhI=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
preBuild = ''
|
|
|
|
export PYGRADLE_PROJECT_VERSION=${version};
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
2023-10-09 19:29:22 +00:00
|
|
|
wheel
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
git
|
|
|
|
mock
|
|
|
|
pep440
|
2023-10-09 19:29:22 +00:00
|
|
|
pip
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
six
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
preCheck = ''
|
|
|
|
unset PYGRADLE_PROJECT_VERSION
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests want to scan site-packages
|
|
|
|
"test_check_dependencies"
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_clean"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_scenario"
|
|
|
|
"test_git_versioning"
|
2023-03-15 16:39:30 +00:00
|
|
|
# setuptools.installer and fetch_build_eggs are deprecated.
|
|
|
|
# Requirements should be satisfied by a PEP 517 installer.
|
|
|
|
"test_brand_new_project"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "setupmeta" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to simplify setup.py files";
|
|
|
|
homepage = "https://github.com/codrsquad/setupmeta";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|