2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
, versioneer
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, twisted
|
|
|
|
}:
|
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}";
|
|
|
|
hash = "sha256-HTj6zbrCrxvh0PeSkeCSOCloTrVGUX6+o57snrKf6PA=";
|
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-01-13 08:15:51 +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-01-13 08:15:51 +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-01-13 08:15:51 +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
|