python3Packages.lz4: 3.1.10 -> 3.1.12

This commit is contained in:
Martin Weinelt 2021-12-29 03:25:33 +01:00
parent c79447275d
commit 5c8e26550e
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,41 +1,68 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, future
, isPy3k
, pythonOlder
# native inputs
, pkgconfig
, psutil
, pytest
, pytest-cov
, pytest-runner
, setuptools-scm
# tests
, psutil
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "python-lz4";
version = "3.1.10";
version = "3.1.12";
format = "setuptools";
# get full repository inorder to run tests
disabled = pythonOlder "3.5";
# get full repository in order to run tests
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0a4gic8xh3simkk5k8302rxwf765pr6y63k3js79mkl983vpxcim";
rev = "v${version}";
sha256 = "sha256-fqt9aJGqZpfbiYtU8cmm7UQaixZwbTKFBwRfR1B/qic=";
};
nativeBuildInputs = [ setuptools-scm pkgconfig pytest-runner ];
checkInputs = [ pytest pytest-cov psutil ];
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
# give a hint to setuptools-scm on package version
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
postPatch = ''
sed -i '/pytest-cov/d' setup.py
'';
meta = {
description = "LZ4 Bindings for Python";
homepage = "https://github.com/python-lz4/python-lz4";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ costrouc ];
nativeBuildInputs = [
setuptools-scm
pkgconfig
];
pythonImportsCheck = [
"lz4"
"lz4.block"
"lz4.frame"
"lz4.stream"
];
checkInputs = [
pytestCheckHook
psutil
];
# leave build directory, so the installed library gets imported
preCheck = ''
pushd tests
'';
postCheck = ''
popd
'';
meta = with lib; {
description = "LZ4 Bindings for Python";
homepage = "https://github.com/python-lz4/python-lz4";
license = licenses.bsd3;
maintainers = with maintainers; [ costrouc ];
};
}