depot/third_party/nixpkgs/pkgs/development/python-modules/cbor2/default.nix
Default email a7848c7476 Project import generated by Copybara.
GitOrigin-RevId: 34ad3ffe08adfca17fcb4e4a47bb5f3b113687be
2021-10-17 11:34:42 +02:00

50 lines
942 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "cbor2";
version = "5.4.2";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4oPnC1WgSf82TMXmSP3lh+TZsOh+SyZkxp5jkTXms7g=";
};
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov" ""
'';
# https://github.com/agronholm/cbor2/issues/99
disabledTests = lib.optionals stdenv.is32bit [
"test_huge_truncated_bytes"
"test_huge_truncated_string"
];
pythonImportsCheck = [
"cbor2"
];
meta = with lib; {
description = "Python CBOR (de)serializer with extensive tag support";
homepage = "https://github.com/agronholm/cbor2";
license = licenses.mit;
maintainers = with maintainers; [ taneb ];
};
}