2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, jsonconversion
|
|
|
|
, six
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "amazon-ion";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.9.3";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# test vectors require git submodule
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amzn";
|
|
|
|
repo = "ion-python";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-FLwzHcge+vLcRY4gOzrxS3kWlprCkRXX5KeGOoTJDSw=";
|
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
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonconversion
|
|
|
|
six
|
|
|
|
];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
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"
|
|
|
|
];
|
|
|
|
|
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";
|
2022-04-03 18:54:34 +00:00
|
|
|
homepage = "https://github.com/amzn/ion-python";
|
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
|
|
|
};
|
|
|
|
}
|