2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
versioneer,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
twisted,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
self = buildPythonPackage rec {
|
|
|
|
pname = "constantly";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "23.10.4";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twisted";
|
|
|
|
repo = "constantly";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-yXPHQP4B83PuRNvDBnRTx/MaPaQxCl1g5Xrle+N/d7I=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
versioneer
|
|
|
|
] ++ versioneer.optional-dependencies.toml;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# would create dependency loop with twisted
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ twisted ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
runHook preCheck
|
2023-08-04 22:07:22 +00:00
|
|
|
trial constantly
|
2024-01-13 08:15:51 +00:00
|
|
|
runHook postCheck
|
2023-08-04 22:07:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "constantly" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
passthru.tests.constantly = self.overridePythonAttrs { doCheck = true; };
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Module for symbolic constant support";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/twisted/constantly";
|
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
in
|
|
|
|
self
|