lol

python3Packages.parsel: fix build

+40 -11
+40 -11
pkgs/development/python-modules/parsel/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 + , cssselect 3 4 , fetchPypi 4 - , pytest 5 - , pytestrunner 6 5 , functools32 6 + , isPy27 7 + , lxml 8 + , pytestCheckHook 7 9 , six 8 10 , w3lib 9 - , lxml 10 - , cssselect 11 - , isPy27 12 11 }: 13 12 14 13 buildPythonPackage rec { ··· 20 19 sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh"; 21 20 }; 22 21 23 - checkInputs = [ pytest pytestrunner ]; 24 - propagatedBuildInputs = [ six w3lib lxml cssselect ] ++ lib.optionals isPy27 [ functools32 ]; 22 + propagatedBuildInputs = [ 23 + cssselect 24 + lxml 25 + six 26 + w3lib 27 + ] ++ lib.optionals isPy27 [ 28 + functools32 29 + ]; 25 30 26 - checkPhase = '' 27 - py.test 31 + checkInputs = [ 32 + pytestCheckHook 33 + ]; 34 + 35 + postPatch = '' 36 + substituteInPlace setup.py \ 37 + --replace "'pytest-runner'," "" 28 38 ''; 29 39 40 + disabledTests = [ 41 + # Test are out-dated and are failing (AssertionError: Lists differ: ...) 42 + # https://github.com/scrapy/parsel/pull/174 43 + "test_differences_parsing_xml_vs_html" 44 + "test_nested_selectors" 45 + "test_re" 46 + "test_replacement_null_char_from_body" 47 + "test_select_on_text_nodes" 48 + "test_selector_get_alias" 49 + "test_selector_getall_alias" 50 + "test_selector_over_text" 51 + "test_selectorlist_get_alias" 52 + "test_selectorlist_getall_alias" 53 + "test_slicing" 54 + "test_text_pseudo_element" 55 + ]; 56 + 57 + pythonImportsCheck = [ "parsel" ]; 58 + 30 59 meta = with lib; { 31 60 homepage = "https://github.com/scrapy/parsel"; 32 - description = "Parsel is a library to extract data from HTML and XML using XPath and CSS selectors"; 61 + description = "Python library to extract data from HTML and XML using XPath and CSS selectors"; 33 62 license = licenses.bsd3; 63 + maintainers = with maintainers; [ fab ]; 34 64 }; 35 - 36 65 }