summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-lz4/default.nix
blob: 544d8f6254d62acbfd16b5a0c727c96af8bdfe9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestrunner
, pytest
, psutil
, setuptools_scm
, pkgconfig
, isPy3k
, future
}:

buildPythonPackage rec {
  pname = "python-lz4";
  version = "2.1.2";

  # get full repository inorder to run tests
  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "v${version}";
    sha256 = "1kzzdfkrq9nnlh0wssa6ccncvv0sk4wmhivhgyndjxz6d6przl5d";
  };

  buildInputs = [ setuptools_scm pkgconfig pytestrunner ];
  checkInputs = [ pytest 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 ];
  };
}