2021-03-10 12:35:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-12 18:11:58 +00:00
|
|
|
, pythonOlder
|
2021-03-10 12:35:01 +00:00
|
|
|
, fetchPypi
|
2021-03-12 18:11:58 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, toml
|
|
|
|
, importlib-metadata
|
2021-05-24 09:23:41 +01:00
|
|
|
, cssselect
|
|
|
|
, lxml
|
2021-03-10 12:35:01 +00:00
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2018-04-03 12:13:12 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cssutils";
|
2021-05-24 09:23:41 +01:00
|
|
|
version = "2.3.0";
|
2021-03-10 12:35:01 +00:00
|
|
|
|
2021-03-12 18:11:58 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-04-03 12:13:12 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-05-24 09:23:41 +01:00
|
|
|
sha256 = "sha256-stOxYEfKroLlxZADaTW6+htiHPRcLziIWvS+SDjw/QA=";
|
2018-04-03 12:13:12 +01:00
|
|
|
};
|
|
|
|
|
2021-03-12 18:11:58 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2021-03-10 12:35:01 +00:00
|
|
|
checkInputs = [
|
2021-05-24 09:23:41 +01:00
|
|
|
cssselect
|
|
|
|
lxml
|
2021-03-10 12:35:01 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-03-12 18:11:58 +00:00
|
|
|
# access network
|
|
|
|
"test_parseUrl"
|
|
|
|
"encutils"
|
2021-05-24 09:23:41 +01:00
|
|
|
"website.logging"
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
# AttributeError: module 'importlib.resources' has no attribute 'files'
|
|
|
|
"test_parseFile"
|
|
|
|
"test_parseString"
|
|
|
|
"test_combine"
|
2021-03-10 12:35:01 +00:00
|
|
|
];
|
2018-04-03 12:13:12 +01:00
|
|
|
|
2021-03-10 12:35:01 +00:00
|
|
|
pythonImportsCheck = [ "cssutils" ];
|
2018-04-03 12:13:12 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-03-10 12:35:01 +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";
|
2018-04-03 12:13:12 +01:00
|
|
|
license = licenses.lgpl3Plus;
|
2021-03-10 12:35:01 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2018-04-03 12:13:12 +01:00
|
|
|
};
|
|
|
|
}
|