nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, pythonAtLeast
4, pythonOlder
5, fetchpatch
6, fetchPypi
7, setuptools
8, setuptools-scm
9, toml
10, importlib-metadata
11, cssselect
12, lxml
13, mock
14, pytestCheckHook
15, importlib-resources
16}:
17
18buildPythonPackage rec {
19 pname = "cssutils";
20 version = "2.4.0";
21
22 disabled = pythonOlder "3.7";
23
24 format = "pyproject";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-LZchCoOwo/4eRGn1/5pkILB4VyA1GIsbq3EDw6NtyJs=";
29 };
30
31 nativeBuildInputs = [
32 setuptools
33 setuptools-scm
34 toml
35 ];
36
37 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
38 importlib-metadata
39 ];
40
41 checkInputs = [
42 cssselect
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}