depot/third_party/nixpkgs/pkgs/development/python-modules/klein/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

74 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
setuptools,
# dependencies
attrs,
hyperlink,
incremental,
tubes,
twisted,
werkzeug,
zope-interface,
# tests
idna,
python,
treq,
}:
buildPythonPackage rec {
pname = "klein";
version = "24.8.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "twisted";
repo = "klein";
rev = "refs/tags/${version}";
hash = "sha256-2/zl4fS9ZP73quPmGnz2+brEt84ODgVS89Om/cUsj0M=";
};
build-system = [
incremental
setuptools
];
dependencies = [
attrs
hyperlink
incremental
twisted
tubes
werkzeug
zope-interface
];
nativeCheckInputs = [
idna
treq
];
checkPhase = ''
runHook preCheck
${python.interpreter} -m twisted.trial klein
runHook postCheck
'';
pythonImportsCheck = [ "klein" ];
meta = with lib; {
changelog = "https://github.com/twisted/klein/releases/tag/${version}";
description = "Klein Web Micro-Framework";
homepage = "https://github.com/twisted/klein";
license = licenses.mit;
maintainers = with maintainers; [ exarkun ];
};
}