2018-08-08 19:27:47 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2019-08-01 18:41:10 +00:00
|
|
|
, future
|
|
|
|
, isPy3k
|
|
|
|
, pkgconfig
|
2018-08-08 19:27:47 +00:00
|
|
|
, psutil
|
2019-08-01 18:41:10 +00:00
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
, pytestrunner
|
2021-06-03 10:09:11 +00:00
|
|
|
, setuptools-scm
|
2018-08-08 19:27:47 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-lz4";
|
2021-03-24 17:41:55 +00:00
|
|
|
version = "3.1.3";
|
2018-08-08 19:27:47 +00:00
|
|
|
|
|
|
|
# get full repository inorder to run tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-24 17:41:55 +00:00
|
|
|
sha256 = "009c4rbyj4cjb8fznccfpr5wrzdmi56wq990yjh22n0z2qqylmkf";
|
2018-08-08 19:27:47 +00:00
|
|
|
};
|
|
|
|
|
2021-06-03 10:09:11 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm pkgconfig pytestrunner ];
|
2019-08-01 18:41:10 +00:00
|
|
|
checkInputs = [ pytest pytestcov psutil ];
|
2018-08-08 19:27:47 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
|
|
|
|
|
2021-06-03 10:09:11 +00:00
|
|
|
# give a hint to setuptools-scm on package version
|
2018-08-08 19:27:47 +00:00
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "LZ4 Bindings for Python";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/python-lz4/python-lz4";
|
2018-12-06 02:25:22 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2018-08-08 19:27:47 +00:00
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|