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