2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, mock
|
|
|
|
, pep440
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools-scm
|
2022-04-27 09:35:20 +00:00
|
|
|
, six
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "setupmeta";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "3.4.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}";
|
|
|
|
hash = "sha256-HNGoLCTidgnaU5QA+0d/PQuCswigjdvQC3/w19i+Xuc=";
|
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-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
git
|
|
|
|
mock
|
|
|
|
pep440
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"setupmeta"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to simplify setup.py files";
|
|
|
|
homepage = "https://github.com/codrsquad/setupmeta";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|