ch9344: 2.0 -> 0-unstable-2024-11-15 (#354536)
[NixPkgs.git] / pkgs / development / python-modules / amazon-ion / default.nix
blobd10b9f4ff049877cdee886f94056e87f835b6a6f
2   lib,
3   buildPythonPackage,
4   cbor2,
5   docopt,
6   fetchFromGitHub,
7   jsonconversion,
8   pytestCheckHook,
9   pythonOlder,
10   setuptools,
11   six,
12   tabulate,
15 buildPythonPackage rec {
16   pname = "amazon-ion";
17   version = "0.12.0";
18   pyproject = true;
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "amazon-ion";
24     repo = "ion-python";
25     rev = "refs/tags/v${version}";
26     # Test vectors require git submodule
27     fetchSubmodules = true;
28     hash = "sha256-L21FYl4Q+nhB3CU1maOxBHSLU+ox1POHtMio8SSZ/r0=";
29   };
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "'pytest-runner'," ""
34   '';
36   nativeBuildInputs = [ setuptools ];
38   propagatedBuildInputs = [
39     jsonconversion
40     six
41   ];
43   nativeCheckInputs = [
44     cbor2
45     docopt
46     pytestCheckHook
47     tabulate
48   ];
50   disabledTests = [
51     # ValueError: Exceeds the limit (4300) for integer string conversion
52     "test_roundtrips"
53   ];
55   disabledTestPaths = [
56     # Exclude benchmarks
57     "tests/test_benchmark_cli.py"
58   ];
60   pythonImportsCheck = [ "amazon.ion" ];
62   meta = with lib; {
63     description = "Python implementation of Amazon Ion";
64     homepage = "https://github.com/amazon-ion/ion-python";
65     changelog = "https://github.com/amazon-ion/ion-python/releases/tag/v${version}";
66     sourceProvenance = with sourceTypes; [
67       fromSource
68       binaryNativeCode
69     ];
70     license = licenses.asl20;
71     maintainers = with maintainers; [ terlar ];
72   };