about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cssselect2/default.nix
blob: 9b58da4fdb21d2e0b26bfb527f985f047e1bed62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, flit-core
, pythonOlder
, fetchPypi
, tinycss2
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "cssselect2";
  version = "0.7.0";
  format = "pyproject";
  disabled = pythonOlder "3.5";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-HM2YTauJ/GiVUEOspOGwPgzynK2YgPbijjunp0sUqlo=";
  };

  postPatch = ''
    sed -i '/^addopts/d' pyproject.toml
  '';

  nativeBuildInputs = [
    flit-core
  ];

  propagatedBuildInputs = [ tinycss2 ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "cssselect2" ];

  meta = with lib; {
    description = "CSS selectors for Python ElementTree";
    homepage = "https://github.com/Kozea/cssselect2";
    license = licenses.bsd3;
  };
}