1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9 versioneer,
10
11 # tests
12 twisted,
13}:
14
15let
16 self = buildPythonPackage rec {
17 pname = "constantly";
18 version = "23.10.4";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "twisted";
25 repo = "constantly";
26 rev = "refs/tags/${version}";
27 hash = "sha256-yXPHQP4B83PuRNvDBnRTx/MaPaQxCl1g5Xrle+N/d7I=";
28 };
29
30 nativeBuildInputs = [
31 setuptools
32 versioneer
33 ] ++ versioneer.optional-dependencies.toml;
34
35 # would create dependency loop with twisted
36 doCheck = false;
37
38 nativeCheckInputs = [ twisted ];
39
40 checkPhase = ''
41 runHook preCheck
42 trial constantly
43 runHook postCheck
44 '';
45
46 pythonImportsCheck = [ "constantly" ];
47
48 passthru.tests.constantly = self.overridePythonAttrs { doCheck = true; };
49
50 meta = with lib; {
51 description = "Module for symbolic constant support";
52 homepage = "https://github.com/twisted/constantly";
53 license = licenses.mit;
54 maintainers = with maintainers; [ ];
55 };
56 };
57in
58self