depot/third_party/nixpkgs/pkgs/development/python-modules/cbor2/default.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

50 lines
948 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "cbor2";
version = "5.4.2.post1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nPIdWWBLlSnXh3yOA0Ki66rhoH/o/1aD3HX+wVhHx5c=";
};
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 ];
};
}