python3Packages.parsel: fix build
This commit is contained in:
parent
331a820362
commit
61a374ac3a
@ -1,14 +1,13 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, cssselect
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
|
||||||
, pytestrunner
|
|
||||||
, functools32
|
, functools32
|
||||||
|
, isPy27
|
||||||
|
, lxml
|
||||||
|
, pytestCheckHook
|
||||||
, six
|
, six
|
||||||
, w3lib
|
, w3lib
|
||||||
, lxml
|
|
||||||
, cssselect
|
|
||||||
, isPy27
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -20,17 +19,47 @@ buildPythonPackage rec {
|
|||||||
sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh";
|
sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest pytestrunner ];
|
propagatedBuildInputs = [
|
||||||
propagatedBuildInputs = [ six w3lib lxml cssselect ] ++ lib.optionals isPy27 [ functools32 ];
|
cssselect
|
||||||
|
lxml
|
||||||
|
six
|
||||||
|
w3lib
|
||||||
|
] ++ lib.optionals isPy27 [
|
||||||
|
functools32
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkInputs = [
|
||||||
py.test
|
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" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/scrapy/parsel";
|
homepage = "https://github.com/scrapy/parsel";
|
||||||
description = "Parsel is a library to extract data from HTML and XML using XPath and CSS selectors";
|
description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user