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 { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, future , pythonOlder
, isPy3k
# native inputs
, pkgconfig , pkgconfig
, psutil
, pytest
, pytest-cov
, pytest-runner
, setuptools-scm , setuptools-scm
# tests
, psutil
, pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-lz4"; 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 { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = "v${version}";
sha256 = "0a4gic8xh3simkk5k8302rxwf765pr6y63k3js79mkl983vpxcim"; sha256 = "sha256-fqt9aJGqZpfbiYtU8cmm7UQaixZwbTKFBwRfR1B/qic=";
}; };
nativeBuildInputs = [ setuptools-scm pkgconfig pytest-runner ]; SETUPTOOLS_SCM_PRETEND_VERSION = version;
checkInputs = [ pytest pytest-cov psutil ];
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
# give a hint to setuptools-scm on package version postPatch = ''
preBuild = '' sed -i '/pytest-cov/d' setup.py
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
''; '';
meta = { nativeBuildInputs = [
description = "LZ4 Bindings for Python"; setuptools-scm
homepage = "https://github.com/python-lz4/python-lz4"; pkgconfig
license = lib.licenses.bsd3; ];
maintainers = with lib.maintainers; [ costrouc ];
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 ];
}; };
} }