nixpkgs-suyu/pkgs/development/python-modules/cssselect2/default.nix
Drew Risinger 8fb624ceff python3Packages.cssselect2: unbreak
Imports were out of date. v0.3.0 no longer supports python2.
2020-07-01 10:37:29 -07:00

39 lines
854 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, tinycss2
, pytest
, pytestrunner
}:
buildPythonPackage rec {
pname = "cssselect2";
version = "0.3.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "5c2716f06b5de93f701d5755a9666f2ee22cbcd8b4da8adddfc30095ffea3abc";
};
# We're not interested in code quality tests
postPatch = ''
substituteInPlace setup.cfg \
--replace "pytest-cov" "" \
--replace "pytest-flake8" "" \
--replace "pytest-isort" "" \
--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;
};
}