2020-07-01 09:31:53 -07:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, tinycss2
|
|
|
|
, pytest
|
|
|
|
, pytestrunner
|
|
|
|
}:
|
2018-04-07 04:31:54 -07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cssselect2";
|
2020-06-05 23:47:02 -07:00
|
|
|
version = "0.3.0";
|
2020-07-01 09:31:53 -07:00
|
|
|
disabled = pythonOlder "3.5";
|
2018-04-07 04:31:54 -07:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-05 23:47:02 -07:00
|
|
|
sha256 = "5c2716f06b5de93f701d5755a9666f2ee22cbcd8b4da8adddfc30095ffea3abc";
|
2018-04-07 04:31:54 -07:00
|
|
|
};
|
|
|
|
|
2019-03-26 06:57:49 -07:00
|
|
|
# We're not interested in code quality tests
|
|
|
|
postPatch = ''
|
2020-07-01 09:31:53 -07:00
|
|
|
substituteInPlace setup.cfg \
|
2019-03-26 06:57:49 -07:00
|
|
|
--replace "pytest-cov" "" \
|
|
|
|
--replace "pytest-flake8" "" \
|
2020-07-01 09:31:53 -07:00
|
|
|
--replace "pytest-isort" "" \
|
2019-03-26 06:57:49 -07:00
|
|
|
--replace "--flake8" "" \
|
|
|
|
--replace "--isort" ""
|
|
|
|
'';
|
2018-04-07 04:31:54 -07:00
|
|
|
|
2019-03-26 06:57:49 -07:00
|
|
|
propagatedBuildInputs = [ tinycss2 ];
|
2018-04-07 04:31:54 -07:00
|
|
|
|
2019-03-26 06:57:49 -07:00
|
|
|
checkInputs = [ pytest pytestrunner ];
|
2018-04-07 04:31:54 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CSS selectors for Python ElementTree";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/Kozea/cssselect2";
|
2018-04-07 04:31:54 -07:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|