3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/parsel/default.nix

66 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
2021-06-07 12:41:33 +01:00
, cssselect
, fetchPypi
, functools32
2021-06-07 12:41:33 +01:00
, isPy27
, lxml
, pytestCheckHook
, six
, w3lib
}:
buildPythonPackage rec {
pname = "parsel";
version = "1.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh";
};
2021-06-07 12:41:33 +01:00
propagatedBuildInputs = [
cssselect
lxml
six
w3lib
] ++ lib.optionals isPy27 [
functools32
];
checkInputs = [
pytestCheckHook
];
2021-06-07 12:41:33 +01:00
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'," ""
'';
2021-06-07 12:41:33 +01:00
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" ];
meta = with lib; {
homepage = "https://github.com/scrapy/parsel";
2021-06-07 12:41:33 +01:00
description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
license = licenses.bsd3;
2021-06-07 12:41:33 +01:00
maintainers = with maintainers; [ fab ];
};
}