2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, isPy3k
|
|
|
|
, pkgconfig
|
|
|
|
, psutil
|
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
, pytestrunner
|
|
|
|
, setuptools_scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-lz4";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "3.1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# get full repository inorder to run tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "009c4rbyj4cjb8fznccfpr5wrzdmi56wq990yjh22n0z2qqylmkf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
nativeBuildInputs = [ setuptools_scm pkgconfig pytestrunner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ pytest pytestcov psutil ];
|
|
|
|
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
|
|
|
|
|
|
|
|
# give a hint to setuptools_scm on package version
|
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "LZ4 Bindings for Python";
|
|
|
|
homepage = "https://github.com/python-lz4/python-lz4";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|