1{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
2, six, pytestCheckHook, pytest-benchmark, numpy, arrow, ruamel_yaml
3}:
4
5buildPythonPackage rec {
6 pname = "construct";
7 version = "2.10.56";
8
9 disabled = pythonOlder "3.6";
10
11 # no tests in PyPI tarball
12 src = fetchFromGitHub {
13 owner = pname;
14 repo = pname;
15 rev = "v${version}";
16 sha256 = "1j4mqwyxkbdcsnnk5bbdcljv855w4fglaqc94q1xdzm8kgjxk4mr";
17 };
18
19 checkInputs = [ pytestCheckHook pytest-benchmark numpy arrow ruamel_yaml ];
20
21 disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
22
23 pytestFlagsArray = [ "--benchmark-disable" ];
24
25 meta = with stdenv.lib; {
26 description = "Powerful declarative parser (and builder) for binary data";
27 homepage = "https://construct.readthedocs.org/";
28 license = licenses.mit;
29 maintainers = with maintainers; [ bjornfor ];
30 };
31}