2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2022-06-16 17:23:12 +00:00
|
|
|
, rapidjson
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, glibcLocales
|
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
|
|
|
rapidjson' = rapidjson.overrideAttrs (old: {
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "unstable-2023-03-06";
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tencent";
|
|
|
|
repo = "rapidjson";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "083f359f5c36198accc2b9360ce1e32a333231d9";
|
|
|
|
hash = "sha256-8O5KwZcvoEkpE+O0Twn2CKHjV2AYh8qnSaBofoWEBs8=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2023-03-15 16:39:30 +00:00
|
|
|
name = "do-not-include-gtest-src-dir.patch";
|
|
|
|
url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
|
|
|
|
})
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
# valgrind_unittest failed
|
|
|
|
cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_CTEST_ARGUMENTS=-E;valgrind_unittest" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python-rapidjson";
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-rP7L9e25HscqIKEl3n9WuML2Fh7/TGU4LI7mokhNNUA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
setupPyBuildFlags = [
|
|
|
|
"--rj-include-dir=${lib.getDev rapidjson'}/include"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"benchmarks"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/python-rapidjson/python-rapidjson";
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Python wrapper around rapidjson";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|