at 22.05-pre 942 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, future 5, isPy3k 6, pkgconfig 7, psutil 8, pytest 9, pytest-cov 10, pytest-runner 11, setuptools-scm 12}: 13 14buildPythonPackage rec { 15 pname = "python-lz4"; 16 version = "3.1.3"; 17 18 # get full repository inorder to run tests 19 src = fetchFromGitHub { 20 owner = pname; 21 repo = pname; 22 rev = "v${version}"; 23 sha256 = "009c4rbyj4cjb8fznccfpr5wrzdmi56wq990yjh22n0z2qqylmkf"; 24 }; 25 26 nativeBuildInputs = [ setuptools-scm pkgconfig pytest-runner ]; 27 checkInputs = [ pytest pytest-cov psutil ]; 28 propagatedBuildInputs = lib.optionals (!isPy3k) [ future ]; 29 30 # give a hint to setuptools-scm on package version 31 preBuild = '' 32 export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}" 33 ''; 34 35 meta = { 36 description = "LZ4 Bindings for Python"; 37 homepage = "https://github.com/python-lz4/python-lz4"; 38 license = lib.licenses.bsd3; 39 maintainers = with lib.maintainers; [ costrouc ]; 40 }; 41}