2020-07-18 16:06:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, tinycss2
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cssselect2";
|
2020-11-06 00:33:48 +00:00
|
|
|
version = "0.4.1";
|
2020-07-18 16:06:22 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-06 00:33:48 +00:00
|
|
|
sha256 = "93fbb9af860e95dd40bf18c3b2b6ed99189a07c0f29ba76f9c5be71344664ec8";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/^addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ tinycss2 ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "cssselect2" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CSS selectors for Python ElementTree";
|
|
|
|
homepage = "https://github.com/Kozea/cssselect2";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|