2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonAtLeast
|
2021-03-23 19:22:30 +00:00
|
|
|
, pythonOlder
|
2022-01-19 23:45:15 +00:00
|
|
|
, fetchpatch
|
2021-03-12 07:09:13 +00:00
|
|
|
, fetchPypi
|
2022-03-05 16:20:37 +00:00
|
|
|
, setuptools
|
2021-03-23 19:22:30 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, toml
|
|
|
|
, importlib-metadata
|
2021-05-29 03:34:57 +00:00
|
|
|
, cssselect
|
|
|
|
, lxml
|
2021-03-12 07:09:13 +00:00
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
2022-03-05 16:20:37 +00:00
|
|
|
, importlib-resources
|
2021-03-12 07:09:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cssutils";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "2.4.0";
|
2021-03-12 07:09:13 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
hash = "sha256-LZchCoOwo/4eRGn1/5pkILB4VyA1GIsbq3EDw6NtyJs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
setuptools
|
2021-03-23 19:22:30 +00:00
|
|
|
setuptools-scm
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
checkInputs = [
|
2021-05-29 03:34:57 +00:00
|
|
|
cssselect
|
|
|
|
lxml
|
2021-03-12 07:09:13 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2022-03-05 16:20:37 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
2021-03-12 07:09:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-03-23 19:22:30 +00:00
|
|
|
# access network
|
|
|
|
"test_parseUrl"
|
|
|
|
"encutils"
|
2021-05-29 03:34:57 +00:00
|
|
|
"website.logging"
|
2021-03-12 07:09:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
pythonImportsCheck = [ "cssutils" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-12 07:09:13 +00:00
|
|
|
description = "A CSS Cascading Style Sheets library for Python";
|
|
|
|
homepage = "https://github.com/jaraco/cssutils";
|
|
|
|
changelog = "https://github.com/jaraco/cssutils/blob/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2021-03-12 07:09:13 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|