at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cbor2, 5 docopt, 6 fetchFromGitHub, 7 jsonconversion, 8 pytestCheckHook, 9 pytest_7, 10 setuptools, 11 six, 12 tabulate, 13}: 14 15buildPythonPackage rec { 16 pname = "amazon-ion"; 17 version = "0.13.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "amazon-ion"; 22 repo = "ion-python"; 23 tag = "v${version}"; 24 # Test vectors require git submodule 25 fetchSubmodules = true; 26 hash = "sha256-ZnslVmXE2YvTAkpfw2lbpB+uF85n/CvA22htO/Y7yWk="; 27 }; 28 29 postPatch = '' 30 substituteInPlace setup.py \ 31 --replace "'pytest-runner'," "" 32 ''; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ 37 jsonconversion 38 six 39 ]; 40 41 nativeCheckInputs = [ 42 cbor2 43 docopt 44 (pytestCheckHook.override { pytest = pytest_7; }) 45 tabulate 46 ]; 47 48 disabledTests = [ 49 # ValueError: Exceeds the limit (4300) for integer string conversion 50 "test_roundtrips" 51 ]; 52 53 disabledTestPaths = [ 54 # Exclude benchmarks 55 "tests/test_benchmark_cli.py" 56 ]; 57 58 pythonImportsCheck = [ "amazon.ion" ]; 59 60 meta = with lib; { 61 description = "Python implementation of Amazon Ion"; 62 homepage = "https://github.com/amazon-ion/ion-python"; 63 changelog = "https://github.com/amazon-ion/ion-python/releases/tag/${src.tag}"; 64 sourceProvenance = with sourceTypes; [ 65 fromSource 66 binaryNativeCode 67 ]; 68 license = licenses.asl20; 69 maintainers = with maintainers; [ terlar ]; 70 }; 71}