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 ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
41
42 disabledTests = [
43 # access network
44 "encutils"
45 "website.logging"
46 ];
47
48 pythonImportsCheck = [ "cssutils" ];
49
50 meta = with lib; {
51 description = "CSS Cascading Style Sheets library for Python";
52 homepage = "https://github.com/jaraco/cssutils";
53 changelog = "https://github.com/jaraco/cssutils/blob/${src.rev}/NEWS.rst";
54 license = licenses.lgpl3Plus;
55 maintainers = with maintainers; [ dotlambda ];
56 };
57}