Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / python-lz4 / default.nix
blobe9317d3f7c67f58a1feef011ef87fcb11e7b0bc3
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , future
5 , isPy3k
6 , pkgconfig
7 , psutil
8 , pytest
9 , pytestcov
10 , pytestrunner
11 , setuptools_scm
14 buildPythonPackage rec {
15   pname = "python-lz4";
16   version = "2.1.10";
18   # get full repository inorder to run tests
19   src = fetchFromGitHub {
20     owner = pname;
21     repo = pname;
22     rev = "v${version}";
23     sha256 = "02cadqfdmw4vc94px18dh4hcybpsa2lr6jz6j5phwc0jjaavh3wr";
24   };
26   nativeBuildInputs = [ setuptools_scm pkgconfig pytestrunner ];
27   checkInputs = [ pytest pytestcov psutil ];
28   propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
30   # give a hint to setuptools_scm on package version
31   preBuild = ''
32     export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
33   '';
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   };