9405df4a82
GitOrigin-RevId: 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17
41 lines
938 B
Nix
41 lines
938 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, future
|
|
, isPy3k
|
|
, pkgconfig
|
|
, psutil
|
|
, pytest
|
|
, pytestcov
|
|
, pytestrunner
|
|
, setuptools_scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-lz4";
|
|
version = "3.1.3";
|
|
|
|
# get full repository inorder to run tests
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "009c4rbyj4cjb8fznccfpr5wrzdmi56wq990yjh22n0z2qqylmkf";
|
|
};
|
|
|
|
nativeBuildInputs = [ setuptools_scm pkgconfig pytestrunner ];
|
|
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 ];
|
|
};
|
|
}
|