2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-06-28 23:13:55 +00:00
|
|
|
, cssselect
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2023-04-29 16:46:19 +00:00
|
|
|
, jmespath
|
2021-06-28 23:13:55 +00:00
|
|
|
, lxml
|
2022-11-02 22:02:43 +00:00
|
|
|
, packaging
|
|
|
|
, psutil
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2022-11-02 22:02:43 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, w3lib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "parsel";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.8.1";
|
2022-11-02 22:02:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-r/KOaMmz8akB2ypOPxWNhICjhyTXMo7nUcGk4cGAHjk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner",' ""
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cssselect
|
2023-04-29 16:46:19 +00:00
|
|
|
jmespath
|
2021-06-28 23:13:55 +00:00
|
|
|
lxml
|
2022-11-02 22:02:43 +00:00
|
|
|
packaging
|
2021-06-28 23:13:55 +00:00
|
|
|
w3lib
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-02 22:02:43 +00:00
|
|
|
psutil
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"parsel"
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
|
2022-11-02 22:02:43 +00:00
|
|
|
homepage = "https://github.com/scrapy/parsel";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|