depot/third_party/nixpkgs/pkgs/development/python-modules/constantly/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

58 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
setuptools,
versioneer,
# tests
twisted,
}:
let
self = buildPythonPackage rec {
pname = "constantly";
version = "23.10.4";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "twisted";
repo = "constantly";
rev = "refs/tags/${version}";
hash = "sha256-yXPHQP4B83PuRNvDBnRTx/MaPaQxCl1g5Xrle+N/d7I=";
};
nativeBuildInputs = [
setuptools
versioneer
] ++ versioneer.optional-dependencies.toml;
# would create dependency loop with twisted
doCheck = false;
nativeCheckInputs = [ twisted ];
checkPhase = ''
runHook preCheck
trial constantly
runHook postCheck
'';
pythonImportsCheck = [ "constantly" ];
passthru.tests.constantly = self.overridePythonAttrs { doCheck = true; };
meta = with lib; {
description = "Module for symbolic constant support";
homepage = "https://github.com/twisted/constantly";
license = licenses.mit;
maintainers = [ ];
};
};
in
self