2019-02-24 15:22:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPyPy
|
|
|
|
, snappy
|
|
|
|
, cffi
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-snappy";
|
2021-02-05 17:19:04 +00:00
|
|
|
version = "0.6.0";
|
2019-02-24 15:22:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 17:19:04 +00:00
|
|
|
sha256 = "06l9my361ig4x5ycyrmq33q83zcdib3y2zxfxv7k7dlpyp9ri2hn";
|
2019-02-24 15:22:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/andrix/python-snappy";
|
2019-02-24 15:22:51 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|