1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, jsonconversion
5, six
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "amazon-ion";
12 version = "0.9.3";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 # test vectors require git submodule
18 src = fetchFromGitHub {
19 owner = "amzn";
20 repo = "ion-python";
21 rev = "v${version}";
22 fetchSubmodules = true;
23 hash = "sha256-FLwzHcge+vLcRY4gOzrxS3kWlprCkRXX5KeGOoTJDSw=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace "'pytest-runner'," ""
29 '';
30
31 propagatedBuildInputs = [
32 jsonconversion
33 six
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 disabledTests = [
41 # ValueError: Exceeds the limit (4300) for integer string conversion
42 "test_roundtrips"
43 ];
44
45 pythonImportsCheck = [
46 "amazon.ion"
47 ];
48
49 meta = with lib; {
50 description = "Python implementation of Amazon Ion";
51 homepage = "https://github.com/amzn/ion-python";
52 sourceProvenance = with sourceTypes; [
53 fromSource
54 binaryNativeCode
55 ];
56 license = licenses.asl20;
57 maintainers = with maintainers; [ terlar ];
58 };
59}