1{ 2 lib, 3 buildPythonPackage, 4 cssselect, 5 fetchPypi, 6 jmespath, 7 lxml, 8 packaging, 9 psutil, 10 pytestCheckHook, 11 pythonOlder, 12 w3lib, 13}: 14 15buildPythonPackage rec { 16 pname = "parsel"; 17 version = "1.9.1"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-FOANwHcxyQMNtiDBlfyuiEtbSEjp+cUjxhGfcIzPqaw="; 25 }; 26 27 postPatch = '' 28 substituteInPlace setup.py \ 29 --replace '"pytest-runner",' "" 30 ''; 31 32 propagatedBuildInputs = [ 33 cssselect 34 jmespath 35 lxml 36 packaging 37 w3lib 38 ]; 39 40 nativeCheckInputs = [ 41 psutil 42 pytestCheckHook 43 ]; 44 45 pythonImportsCheck = [ "parsel" ]; 46 47 meta = with lib; { 48 description = "Python library to extract data from HTML and XML using XPath and CSS selectors"; 49 homepage = "https://github.com/scrapy/parsel"; 50 license = licenses.bsd3; 51 maintainers = with maintainers; [ fab ]; 52 }; 53}