1{ lib, stdenv, buildPythonPackage, fetchFromGitHub
2, pytestCheckHook, pytest-benchmark, enum34, numpy, arrow, ruamel-yaml
3}:
4
5buildPythonPackage rec {
6 pname = "construct";
7 version = "2.10.54";
8
9 # no tests in PyPI tarball
10 src = fetchFromGitHub {
11 owner = pname;
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "1mqspsn6bf3ibvih1zna2glkg8iw7vy5zg9gzg0d1m8zcndk2c48";
15 };
16
17 checkInputs = [ pytestCheckHook enum34 numpy ];
18
19 # these have dependencies that are broken on Python 2
20 disabledTestPaths = [
21 "tests/gallery/test_gallery.py"
22 "tests/test_benchmarks.py"
23 "tests/test_compiler.py"
24 ];
25
26 disabledTests = [
27 "test_benchmarks"
28 "test_timestamp"
29 ] ++ lib.optionals stdenv.isDarwin [
30 "test_multiprocessing"
31 ];
32
33 meta = with lib; {
34 description = "Powerful declarative parser (and builder) for binary data";
35 homepage = "https://construct.readthedocs.org/";
36 license = licenses.mit;
37 maintainers = with maintainers; [ dotlambda ];
38 };
39}