eeb71630af
GitOrigin-RevId: 636051e353461f073ac55d5d42c1ed062a345046
52 lines
895 B
Nix
52 lines
895 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, cssselect
|
|
, fetchPypi
|
|
, lxml
|
|
, packaging
|
|
, psutil
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, w3lib
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "parsel";
|
|
version = "1.7.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-AlQTPLAwTeE/zEhXu4IU/3DWmIcnYfpr6DdOG7vVgZI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace '"pytest-runner",' ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
cssselect
|
|
lxml
|
|
packaging
|
|
w3lib
|
|
];
|
|
|
|
checkInputs = [
|
|
psutil
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"parsel"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
|
|
homepage = "https://github.com/scrapy/parsel";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|