depot/third_party/nixpkgs/pkgs/development/python-modules/cssselect2/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

33 lines
862 B
Nix

{ lib, buildPythonPackage, fetchPypi, tinycss2, pytest, pytestrunner }:
buildPythonPackage rec {
pname = "cssselect2";
version = "0.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h";
};
# 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" ""
'';
propagatedBuildInputs = [ tinycss2 ];
checkInputs = [ pytest pytestrunner ];
meta = with lib; {
description = "CSS selectors for Python ElementTree";
homepage = "https://github.com/Kozea/cssselect2";
license = licenses.bsd3;
};
}