summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/py7zr/default.nix
blob: 0a96e999ec4973032e28efe3dd669198e326301b (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  setuptools-scm,
  brotli,
  inflate64,
  multivolumefile,
  psutil,
  pybcj,
  pycryptodomex,
  pyppmd,
  pyzstd,
  texttable,
  py-cpuinfo,
  pytest-benchmark,
  pytest-httpserver,
  pytest-remotedata,
  pytest-timeout,
  pytestCheckHook,
  requests,
}:

buildPythonPackage rec {
  pname = "py7zr";
  version = "1.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "miurahr";
    repo = "py7zr";
    tag = "v${version}";
    hash = "sha256-uV4zBQZlHfHgM/NiVSjI5I9wJRk9i4ihJn4B2R6XRuM=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    brotli
    inflate64
    multivolumefile
    psutil
    pybcj
    pycryptodomex
    pyppmd
    pyzstd
    texttable
  ];

  nativeCheckInputs = [
    py-cpuinfo
    pytest-benchmark
    pytest-httpserver
    pytest-remotedata
    pytest-timeout
    pytestCheckHook
    requests
  ];

  pytestFlags = [ "--benchmark-disable" ];

  pythonImportsCheck = [
    "py7zr"
  ];

  meta = {
    description = "7zip in Python 3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2";
    homepage = "https://github.com/miurahr/py7zr";
    changelog = "https://github.com/miurahr/py7zr/blob/v${version}/docs/Changelog.rst#v${
      builtins.replaceStrings [ "." ] [ "" ] version
    }";
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [
      pitkling
      PopeRigby
    ];
  };
}