From 19df1a4f294bc9756446951e1b849bbf5aae0763 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 24 Feb 2019 10:22:51 -0500 Subject: [PATCH] pythonPackages.python-snappy: init at 0.5.3 --- .../python-modules/python-snappy/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/python-snappy/default.nix diff --git a/pkgs/development/python-modules/python-snappy/default.nix b/pkgs/development/python-modules/python-snappy/default.nix new file mode 100644 index 00000000000..4615bfcccce --- /dev/null +++ b/pkgs/development/python-modules/python-snappy/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPyPy +, python +, snappy +, cffi +, nose +}: + +buildPythonPackage rec { + pname = "python-snappy"; + version = "0.5.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "8a7f803f06083d4106d55387d2daa32c12b5e376c3616b0e2da8b8a87a27d74a"; + }; + + buildInputs = [ snappy ]; + + propagatedBuildInputs = lib.optional isPyPy cffi; + + checkInputs = [ nose ]; + + checkPhase = '' + rm -r snappy # prevent local snappy from being picked up + nosetests test_snappy.py + '' + lib.optionalString isPyPy '' + nosetests test_snappy_cffi.py + ''; + + meta = with lib; { + description = "Python library for the snappy compression library from Google"; + homepage = http://github.com/andrix/python-snappy; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 77d4a507036..105cde088f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -754,6 +754,10 @@ in { python-sql = callPackage ../development/python-modules/python-sql { }; + python-snappy = callPackage ../development/python-modules/python-snappy { + inherit (pkgs) snappy; + }; + python-stdnum = callPackage ../development/python-modules/python-stdnum { }; python-socketio = callPackage ../development/python-modules/python-socketio { };