From aee30a880155db2e7c84e7a4d210a02b820272f0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 23:54:39 +0100 Subject: [PATCH] python310Packages.parsel: 1.6.0 -> 1.7.0 --- .../python-modules/parsel/default.nix | 49 +++++++------------ 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/parsel/default.nix b/pkgs/development/python-modules/parsel/default.nix index 423f4eb0293b..9c70561cd37b 100644 --- a/pkgs/development/python-modules/parsel/default.nix +++ b/pkgs/development/python-modules/parsel/default.nix @@ -2,63 +2,50 @@ , buildPythonPackage , cssselect , fetchPypi -, functools32 -, isPy27 , lxml +, packaging +, psutil , pytestCheckHook -, six +, pythonOlder , w3lib }: buildPythonPackage rec { pname = "parsel"; - version = "1.6.0"; + version = "1.7.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh"; + hash = "sha256-AlQTPLAwTeE/zEhXu4IU/3DWmIcnYfpr6DdOG7vVgZI="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace '"pytest-runner",' "" + ''; + propagatedBuildInputs = [ cssselect lxml - six + packaging w3lib - ] ++ lib.optionals isPy27 [ - functools32 ]; checkInputs = [ + psutil pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" - ''; - - disabledTests = [ - # Test are out-dated and are failing (AssertionError: Lists differ: ...) - # https://github.com/scrapy/parsel/pull/174 - "test_differences_parsing_xml_vs_html" - "test_nested_selectors" - "test_re" - "test_replacement_null_char_from_body" - "test_select_on_text_nodes" - "test_selector_get_alias" - "test_selector_getall_alias" - "test_selector_over_text" - "test_selectorlist_get_alias" - "test_selectorlist_getall_alias" - "test_slicing" - "test_text_pseudo_element" + pythonImportsCheck = [ + "parsel" ]; - pythonImportsCheck = [ "parsel" ]; - meta = with lib; { - homepage = "https://github.com/scrapy/parsel"; 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 ]; };