about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/construct/2.10.54.nix
blob: 6cfca7260512b07be1989eafc2c7846781faa13d (plain) (blame)
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, stdenv, buildPythonPackage, fetchFromGitHub
, pytestCheckHook, pytest-benchmark, enum34, numpy, arrow, ruamel-yaml
}:

buildPythonPackage rec {
  pname   = "construct";
  version = "2.10.54";

  # no tests in PyPI tarball
  src = fetchFromGitHub {
    owner  = pname;
    repo   = pname;
    rev    = "v${version}";
    sha256 = "1mqspsn6bf3ibvih1zna2glkg8iw7vy5zg9gzg0d1m8zcndk2c48";
  };

  checkInputs = [ pytestCheckHook pytest-benchmark enum34 numpy ];

  # these have dependencies that are broken on Python 2
  disabledTestPaths = [
    "tests/gallery/test_gallery.py"
    "tests/test_benchmarks.py"
    "tests/test_compiler.py"
  ];

  disabledTests = [
    "test_timestamp"
  ] ++ lib.optionals stdenv.isDarwin [
    "test_multiprocessing"
  ];

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

  meta = with lib; {
    description = "Powerful declarative parser (and builder) for binary data";
    homepage = "https://construct.readthedocs.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}