2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, isPy3k
|
|
|
|
, pkgconfig
|
|
|
|
, psutil
|
|
|
|
, pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
|
|
|
, pytest-runner
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-lz4";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "3.1.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# get full repository inorder to run tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2021-12-26 17:43:05 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0a4gic8xh3simkk5k8302rxwf765pr6y63k3js79mkl983vpxcim";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm pkgconfig pytest-runner ];
|
|
|
|
checkInputs = [ pytest pytest-cov psutil ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
# give a hint to setuptools-scm on package version
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|