81047829ea
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
62 lines
1 KiB
Nix
62 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, git
|
|
, mock
|
|
, pep440
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools-scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "setupmeta";
|
|
version = "3.3.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "codrsquad";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "21hABRiY8CTKkpFjePgBAtjs4/G5eFS3aPNMCBC41CY=";
|
|
};
|
|
|
|
preBuild = ''
|
|
export PYGRADLE_PROJECT_VERSION=${version};
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
checkInputs = [
|
|
git
|
|
mock
|
|
pep440
|
|
pytestCheckHook
|
|
];
|
|
|
|
preCheck = ''
|
|
unset PYGRADLE_PROJECT_VERSION
|
|
'';
|
|
|
|
disabledTests = [
|
|
# Tests want to scan site-packages
|
|
"test_check_dependencies"
|
|
"test_scenario"
|
|
"test_git_versioning"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|