1{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
2, pytestCheckHook, pytest-benchmark, numpy, arrow, ruamel-yaml
3, lz4, cloudpickle
4}:
5
6buildPythonPackage rec {
7 pname = "construct";
8 version = "2.10.67";
9
10 disabled = pythonOlder "3.6";
11
12 # no tests in PyPI tarball
13 src = fetchFromGitHub {
14 owner = pname;
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "1nciwim745qk41l1ck4chx3vxpfr6cq4k3a4i7vfnnrd3s6szzsw";
18 };
19
20 # not an explicit dependency, but it's imported by an entrypoint
21 propagatedBuildInputs = [
22 lz4
23 ];
24
25 checkInputs = [ pytestCheckHook pytest-benchmark numpy arrow ruamel-yaml cloudpickle ];
26
27 disabledTests = lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
28
29 pytestFlagsArray = [ "--benchmark-disable" ];
30
31 meta = with lib; {
32 description = "Powerful declarative parser (and builder) for binary data";
33 homepage = "https://construct.readthedocs.org/";
34 license = licenses.mit;
35 maintainers = with maintainers; [ bjornfor ];
36 };
37}