2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPyPy
|
|
|
|
, snappy
|
|
|
|
, cffi
|
2022-04-15 01:41:22 +00:00
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-snappy";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.6.1";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-tqEHqwYgasxTWdTFYyvZsi1EhwKnmzFpsMYuD7gIuyo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ snappy ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optional isPyPy cffi;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2022-04-15 01:41:22 +00:00
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for the snappy compression library from Google";
|
|
|
|
homepage = "https://github.com/andrix/python-snappy";
|
|
|
|
license = licenses.bsd3;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|