2018-12-25 23:10:21 +00:00
|
|
|
{ lib
|
2018-10-26 01:52:36 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, pytestrunner
|
2018-12-25 23:10:21 +00:00
|
|
|
, functools32
|
2018-10-26 01:52:36 +01:00
|
|
|
, six
|
|
|
|
, w3lib
|
|
|
|
, lxml
|
|
|
|
, cssselect
|
2020-05-24 10:20:00 +01:00
|
|
|
, isPy27
|
2018-10-26 01:52:36 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "parsel";
|
2020-05-23 20:44:46 +01:00
|
|
|
version = "1.6.0";
|
2018-10-26 01:52:36 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-23 20:44:46 +01:00
|
|
|
sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh";
|
2018-10-26 01:52:36 +01:00
|
|
|
};
|
|
|
|
|
2019-03-02 13:46:05 +00:00
|
|
|
checkInputs = [ pytest pytestrunner ];
|
2020-05-24 10:20:00 +01:00
|
|
|
propagatedBuildInputs = [ six w3lib lxml cssselect ] ++ lib.optionals isPy27 [ functools32 ];
|
2018-10-26 01:52:36 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
2018-12-25 23:10:21 +00:00
|
|
|
meta = with lib; {
|
2018-10-26 01:52:36 +01:00
|
|
|
homepage = "https://github.com/scrapy/parsel";
|
|
|
|
description = "Parsel is a library to extract data from HTML and XML using XPath and CSS selectors";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|