1{ lib 2, buildPythonPackage 3, pythonAtLeast 4, pythonOlder 5, fetchpatch 6, fetchPypi 7, setuptools 8, setuptools-scm 9, importlib-metadata 10, cssselect 11, jaraco-test 12, lxml 13, mock 14, pytestCheckHook 15, importlib-resources 16}: 17 18buildPythonPackage rec { 19 pname = "cssutils"; 20 version = "2.6.0"; 21 22 disabled = pythonOlder "3.7"; 23 24 format = "pyproject"; 25 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-99zSPBzskJ/fNjDeNG4UE7eyVVk23sFLouu5kTvwgY4="; 29 }; 30 31 nativeBuildInputs = [ 32 setuptools 33 setuptools-scm 34 ]; 35 36 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ 37 importlib-metadata 38 ]; 39 40 checkInputs = [ 41 cssselect 42 jaraco-test 43 lxml 44 mock 45 pytestCheckHook 46 ] ++ lib.optionals (pythonOlder "3.9") [ 47 importlib-resources 48 ]; 49 50 disabledTests = [ 51 # access network 52 "test_parseUrl" 53 "encutils" 54 "website.logging" 55 ]; 56 57 pythonImportsCheck = [ "cssutils" ]; 58 59 meta = with lib; { 60 description = "A CSS Cascading Style Sheets library for Python"; 61 homepage = "https://github.com/jaraco/cssutils"; 62 changelog = "https://github.com/jaraco/cssutils/blob/v${version}/CHANGES.rst"; 63 license = licenses.lgpl3Plus; 64 maintainers = with maintainers; [ dotlambda ]; 65 }; 66}