python312Packages.htmlgen: init at 2.0.0

This commit is contained in:
Doron Behar
2025-02-20 12:07:55 +02:00
parent 9ffaad9af2
commit 940a26d96a
2 changed files with 61 additions and 0 deletions
@@ -0,0 +1,59 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
asserts,
mypy,
}:
buildPythonPackage rec {
pname = "htmlgen";
version = "2.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "srittau";
repo = "python-htmlgen";
tag = "v${version}";
hash = "sha256-RmJKaaTB+xvsJ+9jM21ZUNVTlr7ebPW785A8OXrpDoY=";
};
build-system = [
setuptools
];
dependencies = [
mypy
];
nativeCheckInputs = [
asserts
];
# From some reason, using unittestCheckHook doesn't work, and the list of
# test files have to be used explicitly, and also without the `discover`
# argument.
checkPhase = ''
runHook preCheck
python -m unittest test_htmlgen/*.py
runHook postCheck
'';
pythonImportsCheck = [
"htmlgen"
];
meta = {
description = "Python HTML 5 Generator";
homepage = "https://github.com/srittau/python-htmlgen";
changelog = "https://github.com/srittau/python-htmlgen/blob/v${version}/NEWS.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ doronbehar ];
};
}
+2
View File
@@ -6062,6 +6062,8 @@ self: super: with self; {
htmldate = callPackage ../development/python-modules/htmldate { };
htmlgen = callPackage ../development/python-modules/htmlgen { };
htmllistparse = callPackage ../development/python-modules/htmllistparse { };
htmlmin = callPackage ../development/python-modules/htmlmin { };