2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
callPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
packaging,
|
|
|
|
typing-extensions,
|
|
|
|
tomli,
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
rich,
|
2021-09-26 12:46:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "setuptools-scm";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "8.1.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-07-27 06:49:29 +00:00
|
|
|
pname = "setuptools_scm";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-Qt6htldxy6k7elFdZaZdgkblYHaKZrkQalksjn8myKc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2021-09-26 12:46:18 +00:00
|
|
|
packaging
|
2023-01-20 10:41:00 +00:00
|
|
|
setuptools
|
2022-08-12 12:06:08 +00:00
|
|
|
typing-extensions
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
rich = [ rich ];
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "setuptools_scm" ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# check in passthru.tests.pytest to escape infinite recursion on pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
pytest = callPackage ./tests.nix { };
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/pypa/setuptools_scm/blob/${version}/CHANGELOG.md";
|
2021-04-05 15:23:46 +00:00
|
|
|
homepage = "https://github.com/pypa/setuptools_scm/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Handles managing your python package versions in scm metadata";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|