2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-04-21 15:54:59 +00:00
|
|
|
, cbor2
|
2024-01-02 11:29:13 +00:00
|
|
|
, docopt
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, jsonconversion
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
|
|
|
, six
|
|
|
|
, tabulate
|
2022-04-15 01:41:22 +00:00
|
|
|
}:
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "amazon-ion";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.12.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-01-02 11:29:13 +00:00
|
|
|
owner = "amazon-ion";
|
2022-08-12 12:06:08 +00:00
|
|
|
repo = "ion-python";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
# Test vectors require git submodule
|
2022-08-12 12:06:08 +00:00
|
|
|
fetchSubmodules = true;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-L21FYl4Q+nhB3CU1maOxBHSLU+ox1POHtMio8SSZ/r0=";
|
2022-04-03 18:54:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-04-15 01:41:22 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'," ""
|
2022-04-03 18:54:34 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonconversion
|
|
|
|
six
|
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cbor2
|
2024-01-02 11:29:13 +00:00
|
|
|
docopt
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
tabulate
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTests = [
|
|
|
|
# ValueError: Exceeds the limit (4300) for integer string conversion
|
|
|
|
"test_roundtrips"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Exclude benchmarks
|
|
|
|
"tests/test_benchmark_cli.py"
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"amazon.ion"
|
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-04-15 01:41:22 +00:00
|
|
|
description = "Python implementation of Amazon Ion";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/amazon-ion/ion-python";
|
|
|
|
changelog = "https://github.com/amazon-ion/ion-python/releases/tag/v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
license = licenses.asl20;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ terlar ];
|
2022-04-03 18:54:34 +00:00
|
|
|
};
|
|
|
|
}
|