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
|
|
|
, 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-10-09 19:29:22 +00:00
|
|
|
rev = "5e17dbed34eef33af8f3e734820b5dc547a2a3aa";
|
|
|
|
hash = "sha256-CTy42X6P6+Gz4WbJ3tCpAw3qqlJ+mU1PaWW9LGG+6nU=";
|
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-10-09 19:29:22 +00:00
|
|
|
version = "1.11";
|
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";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-rapidjson";
|
|
|
|
repo = "python-rapidjson";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Jnnr4MCopx2YJTqbHqSCzPBzUl0T8SqcznRGSI14d2Q=";
|
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-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/${src.rev}/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
|
|
|
};
|
|
|
|
}
|