blob: 6dbb101b552e5decbc80d328615059b1f635bca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 ];
};
}
|