about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/parsel/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/parsel/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/parsel/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/parsel/default.nix b/nixpkgs/pkgs/development/python-modules/parsel/default.nix
new file mode 100644
index 000000000000..319f83f72755
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/parsel/default.nix
@@ -0,0 +1,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;
+  };
+
+}