about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/parsel/default.nix
blob: 319f83f727552250f6543659e8d17bee7153abe0 (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
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestrunner
, functools32
, six
, w3lib
, lxml
, cssselect
, isPy27
}:

buildPythonPackage rec {
  pname = "parsel";
  version = "1.6.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0yawf9r3r863lwxj0n89i7h3n8xjbsl5b7n6xg76r68scl5yzvvh";
  };

  checkInputs = [ pytest pytestrunner ];
  propagatedBuildInputs = [ six w3lib lxml cssselect ] ++ lib.optionals isPy27 [ functools32 ];

  checkPhase = ''
    py.test
  '';

  meta = with lib; {
    homepage = "https://github.com/scrapy/parsel";
    description = "Parsel is a library to extract data from HTML and XML using XPath and CSS selectors";
    license = licenses.bsd3;
  };

}