1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools-scm,
7 more-itertools,
8 cssselect,
9 jaraco-test,
10 lxml,
11 mock,
12 pytestCheckHook,
13 importlib-resources,
14}:
15
16buildPythonPackage rec {
17 pname = "cssutils";
18 version = "2.11.1";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "jaraco";
25 repo = "cssutils";
26 tag = "v${version}";
27 hash = "sha256-U9myMfKz1HpYVJXp85izRBpm2wjLHYZj8bUVt3ROTEg=";
28 };
29
30 build-system = [ setuptools-scm ];
31
32 dependencies = [ more-itertools ];
33
34 nativeCheckInputs = [
35 cssselect
36 jaraco-test
37 lxml
38 mock
39 pytestCheckHook
40 ]
41 ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
42
43 disabledTests = [
44 # access network
45 "encutils"
46 "website.logging"
47 ];
48
49 pythonImportsCheck = [ "cssutils" ];
50
51 meta = with lib; {
52 description = "CSS Cascading Style Sheets library for Python";
53 homepage = "https://github.com/jaraco/cssutils";
54 changelog = "https://github.com/jaraco/cssutils/blob/${src.rev}/NEWS.rst";
55 license = licenses.lgpl3Plus;
56 maintainers = with maintainers; [ dotlambda ];
57 };
58}