depot/third_party/nixpkgs/pkgs/development/python-modules/lz4/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

41 lines
942 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, future
, isPy3k
, pkgconfig
, psutil
, pytest
, pytest-cov
, pytest-runner
, 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 pytest-runner ];
checkInputs = [ pytest pytest-cov 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 ];
};
}