at master 1.1 kB view raw
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 tag = version; 27 hash = "sha256-yXPHQP4B83PuRNvDBnRTx/MaPaQxCl1g5Xrle+N/d7I="; 28 }; 29 30 nativeBuildInputs = [ 31 setuptools 32 versioneer 33 ] 34 ++ versioneer.optional-dependencies.toml; 35 36 # would create dependency loop with twisted 37 doCheck = false; 38 39 nativeCheckInputs = [ twisted ]; 40 41 checkPhase = '' 42 runHook preCheck 43 trial constantly 44 runHook postCheck 45 ''; 46 47 pythonImportsCheck = [ "constantly" ]; 48 49 passthru.tests.constantly = self.overridePythonAttrs { doCheck = true; }; 50 51 meta = with lib; { 52 description = "Module for symbolic constant support"; 53 homepage = "https://github.com/twisted/constantly"; 54 license = licenses.mit; 55 maintainers = [ ]; 56 }; 57 }; 58in 59self