python3Packages.orjson: init at 3.6.3 (#137969)

Co-authored-by: Jonathan Ringer <jonringer@users.noreply.github.com>
Co-authored-by: figsoda <figsoda@pm.me>
This commit is contained in:
misuzu 2021-09-19 05:50:44 +03:00 committed by GitHub
parent 9358f9a954
commit 556dcbe51d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,61 @@
{ lib
, stdenv
, pythonOlder
, rustPlatform
, fetchFromGitHub
, buildPythonPackage
, libiconv
, numpy
, psutil
, pytestCheckHook
, python-dateutil
, pytz
, xxhash
}:
buildPythonPackage rec {
pname = "orjson";
version = "3.6.3";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ijl";
repo = pname;
rev = version;
sha256 = "10clf13bp3fqd9b7n1isrfwz7sngcl1j6birqc1xyg9wzfw1kslj";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "163rf8k7qb1whjf78i8v5dlyif1sgvd9xkj8li81j45abgzkq86w";
};
format = "pyproject";
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
checkInputs = [
numpy
psutil
pytestCheckHook
python-dateutil
pytz
xxhash
];
pythonImportsCheck = [ pname ];
meta = with lib; {
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy";
homepage = "https://github.com/ijl/orjson";
license = with licenses; [ asl20 mit ];
platforms = platforms.unix;
maintainers = with maintainers; [ misuzu ];
};
}

View File

@ -5162,6 +5162,8 @@ in {
orderedset = callPackage ../development/python-modules/orderedset { };
orjson = callPackage ../development/python-modules/orjson { };
orm = callPackage ../development/python-modules/orm { };
ortools = (toPythonModule (pkgs.or-tools.override { inherit (self) python; })).python;