2020-07-18 16:06:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-15 01:41:22 +00:00
|
|
|
, flit-core
|
2020-07-18 16:06:22 +00:00
|
|
|
, 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";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.7.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "pyproject";
|
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;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-HM2YTauJ/GiVUEOspOGwPgzynK2YgPbijjunp0sUqlo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/^addopts/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ tinycss2 ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|